I have a website which runs in IIS 7.0 in an Integrated v4.0 application pool. Starting from today I get the below exception in the Windows event Log. The website is online for 1 month and I never got this exception before. I get the exception at the same minutes in every hour which is a little bit strange.
Some possible reason:
I have a library that I created that I load dynamically.
_searchProvider = (ISearchProvider)Activator.CreateInstance("SolrSearchProvider", "SearchProviders.SolrSearchProvider.SolrSearchProvider").Unwrap();
That library has reference to SolrNet.
Do you have any idea what the problem may be or how to investigate more into finding a solution ???
An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 7192
Exception: System.Runtime.Serialization.SerializationException
Message: Unable to find assembly 'SolrNet, Version=0.4.0.1001, Culture=neutral, PublicKeyToken=bc21753e8aa334cb'.
StackTrace: at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.AppDomain.Deserialize(Byte[] blob)
at System.AppDomain.UnmarshalObject(Byte[] blob)
Mauricio Scheffer said: @Dorin: then the real problem is the circular dependency. I recommend posting a new question about that.
I solved the problem with circular dependency and I keep getting the same error in the Windows Event Logs.
First I get Unable to find assembly 'SolrNet, Version=0.4.0.1001, Culture=neutral, PublicKeyToken=bc21753e8aa334cb'
and then the web applicatioin is restarting.
3 to 10 seconds before I get an exception in windows logs, I identified an expcetion in my site log files thrown by entity framework because I was trying to insert an item with the same primary key as an existing one. The exception was not treated in the code but was treated by asp.net because of the CustomErrors settings
<customErrors mode="On" defaultRedirect="/Error.aspx" redirectMode="ResponseRewrite">
<error statusCode="404" redirect="/Error.aspx"/>
</customErrors>
Can this have anything to do with the error in windows log files ??