When adding a new virtual directory to the 'default web site' in IIS Manager, all the other Applications located in the default web site are recycled somehow. In order to simplify my problem, i took an example where i could track a timestamp from an current session and realized that the session information is really getting lost after adding a VD, meaning the AppDomain was recycled.
This is the situation:
Default Web Site 1 (virtual directory) (d:\TestAppDomains\1\) - app1 (Application) (using App Pool 1) 2 (virtual directory) (d:\TestAppDomains\2\) - app2 (Application) (using App Pool 2)
As far as i understood adding a virtual directory is just making changes to the applicationHost.config, which should not cause the AppDomains to recycle. Maybe it is a delegation issue, but i guess i dont get it enough to understand :(
Are there any properties which affect this behaviour? I´ve already set the AppPool settings to not recylcing after a configuration change, but it didnt help.
I would REALLY appreciate if you could help me out with this one, because i am struggling with it for almost 6 months now.
Of course i´ll gladly provide more information if you need them.
The HealthMonitoring cannot help me out on this one for two reasons:
- Cannot find any entry for AppPool recycle, where should it be? Event Viewer -> Windows Logs / Application and Services Logs? (Should be configured properly)
- Maybe i got something wrong. First i thought it is an app-pool recycle but with the simplified test i build an example without any applications and additional app-pools. Now it just looks like this:
Default Web Site 1 (virtual directory) (d:\TestAppDomains\1\) session1.aspx (Sets current timestamp to session variable and redirects to session2.aspx) session2.aspx (displays session variable)
By calling the localhost/1/sessions1.aspx i can see the timestamp. After adding a second virtual directory (e.g. "2" (d:\TestAppDomains\2)) and refreshing the page the session is gone, meaning the variable is null.