Appdomain unloded under IIS 5.0

M

Mike Schilling

My application, which is a hand-coded HttpModule (not created with Visual
Studio.NET) is acting inconsistently on different machines. I have a unit
test that

1. Stops IIS.
2. Installs the application into a virtual directory using cscript
3. Restarts IIS
4. Sends the app a series of messages

On most machines, the first message loads the application into the apsnet_wp
process, where it initializes itself and then remains to process the rest of
the messages. On a few, though, after the first message the application
domain is unloaded, and the next message causes it to be restarted. I'm
sure this is happening because:

1. The app's log shows the startup sequence twice
2. I added some code that traps and logs the AppDomain unload event, and
I see this as well
3. I added some tracing that prints out the hashcode of the current
appdomain, and I can see this change

On the machines which don't unload the AppDomain, I can run step 4 of the
test (sending the app messages) over and over with no unload occurring. If
I touch Web.Config, the AppDomain (correctly) unloads.

Since this is the same code, same automated test, I'm presuming the
difference is something in the IIS or ASP.NET configuration. Does anyone
have any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top