IIS6 with .NET Framework 1.1 and 2.0 at the same time?? can i do that?
-
Hi. This morning tried to run an aplication running under .NET 1.1 at the same time i was developing something in 2.0. But all sites configured in IIS6 gave me errors, for .NET framework 1.1 version. I made a restart (iisreset) and launched first 2.0 web site containing all aplications under that framework version, and all of them worked. If i repeat the process but first initialize aweb aplications under 1.1 net framework website, those aplications works but the ones on 2.0 net framework doesn't. This is normal? I'm a newbie yet, but i'm hungry to learn more. Thanx in advance everybody.;P
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
-
Hi. This morning tried to run an aplication running under .NET 1.1 at the same time i was developing something in 2.0. But all sites configured in IIS6 gave me errors, for .NET framework 1.1 version. I made a restart (iisreset) and launched first 2.0 web site containing all aplications under that framework version, and all of them worked. If i repeat the process but first initialize aweb aplications under 1.1 net framework website, those aplications works but the ones on 2.0 net framework doesn't. This is normal? I'm a newbie yet, but i'm hungry to learn more. Thanx in advance everybody.;P
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
-
Hi. This morning tried to run an aplication running under .NET 1.1 at the same time i was developing something in 2.0. But all sites configured in IIS6 gave me errors, for .NET framework 1.1 version. I made a restart (iisreset) and launched first 2.0 web site containing all aplications under that framework version, and all of them worked. If i repeat the process but first initialize aweb aplications under 1.1 net framework website, those aplications works but the ones on 2.0 net framework doesn't. This is normal? I'm a newbie yet, but i'm hungry to learn more. Thanx in advance everybody.;P
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
The fundamental problem here is that you can only load one version of the Common Language Runtime (CLR, the actual execution engine of the .NET Framework) into a process. The first version to load wins - subsequent attempts to load a different version are simply ignored. IIS 6.0 uses the W3WP.EXE (W3 [World Wide Web] Worker Process) executable to run ASP.NET code. It knows how to host the CLR. IIS 5.x does not natively understand .NET and uses a different model, loading a DLL into its regular worker process, which in turn launches an ASPNET_WP.EXE process, but significantly, different versions of .NET launch their own separate worker processes so the clash does not occur. So what you have to do is to ensure that the .NET 2.0 and .NET 1.1 applications do not share a worker process. You do this, as the other reply says, by defining a new application pool and assigning the .NET 2.0 applications to that. Or you can do it the other way round if you like, placing the 1.1 applications in the new application pool.
Stability. What an interesting concept. -- Chris Maunder
-
Thank you Stefan. I guess i need less gaming and more IIS training. I'll make sure to learn begining from the basis and not to just jump into the last chapert. Thanks again mate. Leistath;)
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
-
The fundamental problem here is that you can only load one version of the Common Language Runtime (CLR, the actual execution engine of the .NET Framework) into a process. The first version to load wins - subsequent attempts to load a different version are simply ignored. IIS 6.0 uses the W3WP.EXE (W3 [World Wide Web] Worker Process) executable to run ASP.NET code. It knows how to host the CLR. IIS 5.x does not natively understand .NET and uses a different model, loading a DLL into its regular worker process, which in turn launches an ASPNET_WP.EXE process, but significantly, different versions of .NET launch their own separate worker processes so the clash does not occur. So what you have to do is to ensure that the .NET 2.0 and .NET 1.1 applications do not share a worker process. You do this, as the other reply says, by defining a new application pool and assigning the .NET 2.0 applications to that. Or you can do it the other way round if you like, placing the 1.1 applications in the new application pool.
Stability. What an interesting concept. -- Chris Maunder
Well what can i say. A perfect answer might say. Too much books about this kind of topic doesn't explain this technical fact in so few lines and at the same time so clearly. I'm on the right path now. Thank you Mike, great explanation! Right now i'm hungry for knowledge hahahaah. Cheers. Leistath ;P
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
-
Well what can i say. A perfect answer might say. Too much books about this kind of topic doesn't explain this technical fact in so few lines and at the same time so clearly. I'm on the right path now. Thank you Mike, great explanation! Right now i'm hungry for knowledge hahahaah. Cheers. Leistath ;P
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
If you want to know what's going on at the low levels of the .NET Framework, Jeffrey Richter's book "CLR via C#" is a good one. I have the first edition of this book, titled "Applied Microsoft .NET Framework Programming". I've not re-read it in a while - I have a good memory for crazy technical detail - but it was a great introduction to the CLR when I first started .NET programming. I can't recall where I first heard about the two-frameworks-in-one-process problem. It might have been Chris Brumme's blog[^] (warning, lots of technical detail ahead!) or simply someone complaining about it in the context of Office add-ins.
Stability. What an interesting concept. -- Chris Maunder