title: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. with EntityDataSource
body: <p>I have a problem that only shows if EntityDataSource present on <a href="https://en.wikipedia.org/wiki/ASP.NET" rel="nofollow">ASP.NET</a> (*.aspx) pages. The interesting thing it's just occurs when I'm refreshing the page (<kbd>F5</kbd>) or viewing it again and it's driving me crazy it seems to be a bug with <a href="http://en.wikipedia.org/wiki/ADO.NET_Entity_Framework" rel="nofollow">Entity Framework</a>, because I tried it with another project, and I just get the same error.</p>
  
  <blockquote>
    <p>Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.</p>
  </blockquote>
  
  <p>Stack trace:</p>
  
  <pre><code>[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
     System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
     System.Reflection.RuntimeModule.GetTypes() +4
     System.Reflection.Assembly.GetTypes() +78
     System.Data.Metadata.Edm.ObjectItemConventionAssemblyLoader.LoadTypesFromAssembly() +32
     System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load() +25
     System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData) +160
     System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage, Object&amp; loaderCookie, Dictionary`2&amp; typesInLoading, List`1&amp; errors) +166
     System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +316
     System.Data.Metadata.Edm.ObjectItemCollection.ExplicitLoadFromAssembly(Assembly assembly, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +53
     System.Data.Metadata.Edm.MetadataWorkspace.ExplicitLoadFromAssembly(Assembly assembly, ObjectItemCollection collection, Action`1 logLoadMessage) +93
     System.Data.Metadata.Edm.MetadataWorkspace.LoadFromAssembly(Assembly assembly, Action`1 logLoadMessage) +130
     System.Web.UI.WebControls.EntityDataSourceView.ConstructContext() +585
     System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +76
     System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
     System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
     System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
     System.Web.UI.WebControls.GridView.DataBind() +4
     System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
     System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
     System.Web.UI.Control.EnsureChildControls() +102
     System.Web.UI.Control.PreRenderRecursiveInternal() +42
     System.Web.UI.Control.PreRenderRecursiveInternal() +175
     System.Web.UI.Control.PreRenderRecursiveInternal() +175
     System.Web.UI.Control.PreRenderRecursiveInternal() +175
     System.Web.UI.Control.PreRenderRecursiveInternal() +175
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
  </code></pre>
  
  <p>How can I fix this problem?</p>