once in a while I am getting an error in the application event logs telling the Lucene.net assembly could not be found which makes IIS process to crash! I first looked to ensure the DLL was in the bin folder with proper version, culture and PublicKeyToken and it does. I then turned on FusionLogs to see why it is not finding that assembly. The FusionLogs creates log files in separate folders for each process detailing assembly binding path lookup flow. I can see that in one specific folder (e.g. c7b5fa2f) that my assembly is found and loaded from the bin folder as expected. I imagine this is the folder created for my w3wp process for my web site. However, it appears that it fails to do so as reported in another folder named w3wp.exe (rather than the griberish name). Looking at the fusion logs it appears that it is looking for that assembly directly under c:\windows\system32\inetsrv!! Here is an excerpt of the fusion logs:
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///c:/windows/system32/inetsrv/Lucene.Net.DLL.
LOG: Attempting download of new URL file:///c:/windows/system32/inetsrv/Lucene.Net/Lucene.Net.DLL.
LOG: Attempting download of new URL file:///c:/windows/system32/inetsrv/Lucene.Net.EXE.
LOG: Attempting download of new URL file:///c:/windows/system32/inetsrv/Lucene.Net/Lucene.Net.EXE.
LOG: All probing URLs attempted and failed.
Below is the actual event log which is causing the IIS process to crash:
An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 3504
Message: Unable to find assembly 'Lucene.Net, Version=18.104.22.168, Culture=neutral, PublicKeyToken=85089178b9ac3181'.
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.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)
Thanks for helping out,