views:

164

answers:

2

I was having a problem with my .NET 1.1 website which was hard to track down. The default page would show up but when the user entered credentials, it would just be as if nothing happened and the default page would be re-loaded again, without any error messages (although the code behind is trapping errors and also my Global.asax is catching Application errors). This would also happen irrespective of the users credentials being entered correctly and to make matters more confusing, it would happen intermittently. Sometimes, the users were able to log in and sometimes when they entered the credentials, all they would see is the default page reloaded again.

This problem was only happening on a machine that didnt have Visual Studio installed so I could'nt debug the problem. It has both 2.0 and 1.1 .NET installed and is a staging server. Also, no errors were written in the application error log or my internal log. SQL trace showed that the SQL server was being called to verify the user credentials and worked but then the default page would be re-loaded again.

After some investigating, I realized that it might not be an application problem since it was intermittently working and looked at the IIS application pool settings. My application was running in the default application pool that was only suppose to have 1.1 application. But the server has some 2.0 applications as well that should have been in their own 2.0 application pools. I just created a new application pool for my application and everything seems to be working fine now.

Not sure why the application was working intermittently, I wonder if the application that started the default pool (could have been 2.0) and therefore the default pool would have been associated with that version of .NET) then when my 1.1 application was trying to use the default pool, it would puke, without any errors or exceptions.

Has anyone also experienced this problem? Very strange behaviour!

A: 

An application pool can only run apps for a single version of .net. 1.0, 1.1 or 2.0.

The reason you get an intermittant/strange problem is that once a 1.1 app is running in an app pool, a 2.0 app will then crash when it starts. However, if the 2.0 app is running first, the 1.1 app will crash when it starts.

Robin Day
A: 

Sounds to me like you answered your own question--or rather, solved the problem yourself, at least. My first thought was "separate the application pools", and then you explained that you had done that and it fixed it.

So to respond to your question: yes, I have seen problems like this (some time ago, though), and the solution was exactly what you did: make separate application pools for the different sections of code. Divide and conquer!

ewall
Thanks for the feedback. Just wondering if there was a problem with the application pool, why did it not log it as an error? I looked in the application event log and couldn't find anything. Also, the application didnt throw an error otherwise it would have been logged in my personal log. Is there another place that I can look to find the error?
Pritika