This blog post is an continuation to my previous blog post on the same topic.
In my previous post, I mentioned that I did not reach a definitive conclusion as to what could have cause the application restarts on every request.
As it turns out while working on a module in my project, I chance across another scenario which may cause the same effect.
Just to provide some background, my project was running on ASP.NET framework 4.0 (running on IIS 7.5 in integrated managed pipeline mode).
Development machine was a Windows 7 (x64).
The scenario that I’m talking about is that I had mixed a x86 DLL into the bin folder of the project.
And wham! The issue of application restarts came back again.
I did not find out whether its that particular x86 DLL in question or will the same thing occur for all x86 DLLs (I’m leaning towards all).
My hypothesis that is that I’m running the application off .NET framework 4 on a x64 machine and mixing x86 DLLs with such a configuration will trigger the application restarts on every request.
Solutions:
- Replace the x86 DLL with a x64 version of the DLL
This is the best solution. - In the Advanced Settings of the AppPool use by the project in IIS, set the Enable 32-bit Applications flag to True.
This works but will cause your application to have some performance issues (ie. slow down the application; running in 32bit vs 64bit).