1

I have a problem running an MVC application in my production server. My default website is running ASP.NET 2.0 and it's using the DefaultAppPool.

After reading the article Running multiple versions of the Framework in ASP.NET I followed what Scott Forsyth's instruction and created a new application pool. I also created a new website in IIS and created a Virtual Directory for my application. So my new website uses port 81 and the Virtual Directory for my MVC app uses the new application pool.

To me it seems that everything should be separate now. The new MVC app should spin up a new w3wp.exe process that uses ASP.NET 4.0. The other applications running under the default website should create a process that uses ASP.NET 2.0.

Unfortunately this is not the case. I keep on getting the 1062 error:

It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.

I tried restarting my server a number of times. This error doesn't always happen. For example, last week everything worked well for 1 day, then this morning (Monday) I got this error. All of my apps in the Default Website stop working and I see other errors in Event Viewer like EventID: 1309 with error:

Exception information: Exception type: WebException Exception message: The operation has timed out

Can anybody help with this? Thanks.

MikeB55
  • 291
  • 1
  • 4
  • 18
  • Is the new app pool set to use .NET 4.0? Also, see this: http://stackoverflow.com/questions/3628729/install-asp-net-4-0-alongside-asp-net-2-0-on-iis6 – Andrew Barber Jan 16 '12 at 12:51
  • hmm...I don't see where I would set an application pool to use a specific version of the .NET framework. So I guess NO, it's not set to use 4.0. How would I do that? – MikeB55 Jan 16 '12 at 12:56
  • Ok, so looking at the link that you suggested, you don't need to configure the AppPool. You just need to make sure that the first website that's used by the apppool is 4.0. This is exactly what I did. – MikeB55 Jan 16 '12 at 13:00
  • No... you need to make sure that the *only* site(s) used by your new app pool are 4.0. Your first error is because another application is trying to run in the same app pool, but it already has a different framework version loaded. – Andrew Barber Jan 16 '12 at 13:07
  • I actually had 2 apps in my app pool, but both were using ASP.NET 4.0. Is that not allowed? Ok, so now i've deleted the 2nd application and now I only have the MVC application in my new website and application pool which used ASP.NET 4.0. I will update this post after 1 day and let everyone know if this worked. – MikeB55 Jan 16 '12 at 13:08
  • The error that says it's not possible to run two different versions of ASP.NET says something different - it says you are running 2 apps that use *different* versions of the framework. – Andrew Barber Jan 16 '12 at 13:11
  • But now I have only 1 app in my new website and application pool. How can I find out the name of the applications that are causing the problem? – MikeB55 Jan 17 '12 at 12:33
  • I think you just have to examine what Pools each website uses, and be sure that they are set to the proper pool. Better yet, give each site it's own pool, if at all possible. – Andrew Barber Jan 17 '12 at 13:50
  • Thanks. I've done that but still no luck. I decided to change my MVC app to a 3.5 app so I don't need to do all of this. It has to be done by next week so I'm out of options. Thanks for your help. – MikeB55 Jan 18 '12 at 14:14
  • You can *only* get that error when two different sites are running in the same app pool, and each uses a different framework version. If you create separate app pools for every site and application (virtual directories can be made into an app), it's not possible to get that error. – Andrew Barber Jan 18 '12 at 16:32
  • Note also that if you are using MVC3, you can't go back to .NET 3.5 – Andrew Barber Jan 18 '12 at 16:33
  • Thanks Andrew. I decided instead to convert my MVC app to a regular .net application. Too bad, i was really looking forward to using MVC for the first time. – MikeB55 Jan 19 '12 at 17:35

0 Answers0