Zhixian's Tech Blog

2012-12-19

ASP.NET application restarts on every request (Part 2)

Filed under: web application development — Tags: , , , — Zhixian @ 11:43:12 am

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:

  1. Replace the x86 DLL with a x64 version of the DLL
    This is the best solution.
  2. In the Advanced Settings of the AppPool use by the project in IIS, set the Enable 32-bit Applications flag to True.
    image
    This works but will cause your application to have some performance issues (ie. slow down the application; running in 32bit vs 64bit).
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: