Hi Gilad!
The DynamicDataStore in EPiServer CMS 6 contains a TypeResolver that can be setup to automatically try to resolve types when loading. This is to support loading "old" instance data into "new" types (versions).
The default behaviour is to have this AutoResolveTypes=true, but it can be changed in the <episerver.dataStore><dataStore> element in web.config:
<episerver.dataStore>
<dataStore defaultProvider="" autoResolveTypes="false">
...
It would howeber be interesting to see what type/assembly it is that is failing in the call to GetTypes(). This could be done by taking a debug memory dump when this exact exception is thrown, and then inspect it using WinDBG+psscor2. I would gladly help you with this
if you'd like.
My initial hunch is that it might be a autogenerated assembly thats causing this problem, so I would recommend you to first clear the folder "c:\windows\microsoft.net\framework\v4.0.30319\Temporary Asp.Net Files" completely and then restart the webservice. This would ensure that all dynamically generated assemblys will be recreated.
Regards,
Johan
autoResolveTypes="false" worked for me
i need a little help with the windbg
hi
we experienced strange behavior after upgrading to epi 6 + .net 4 ( the last problem at last )
in the developer machines we can surf to svc service but in our production/staging environment
we receive strange error that include a code from episerver.data
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
the stack ( EPiServer.Data.Dynamic.TypeResolver.ResolveType ?? where did it came from )
[We use classic mode with epi 6]
[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.Assembly.GetTypes() +144
EPiServer.Data.Dynamic.TypeResolver.ResolveType(Object sender, ResolveEventArgs args) +81
System.AppDomain.OnTypeResolveEvent(RuntimeAssembly assembly, String typeName) +12514011
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +314
System.Type.GetType(String typeName, Boolean throwOnError) +89
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +125
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1423
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +50
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +1132
[ServiceActivationException: The service '/xxxx/xxxxx/xxxxxx.svc' cannot be activated due to an exception during compilation. The exception message is: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..]
System.Runtime.AsyncResult.End(IAsyncResult result) +890624
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +180062
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +407
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266