Saturday, February 16, 2008

IIS 6.0 and .NET 3.5 Website Configuration

Currently I am in the middle of developing a few of my own Website projects. While the projects themselves are not important (and will be announced later) I am going to start posting any of my experiences in setting up these sites in the Virtual Dedicated Server which I have now leased.

I took the approach of my own Virtual Dedicated Server to have the most control over how these websites are setup and because it will be a good re-learning experience. I used to be involved with web deployments a lot, but recently my regular work projects have steered me clear of this area, its time to change that.

.NET 3.5 Running in IIS 6.0

One of my first challenges was the need to deploy my first .NET 3.5 framework websites into this freshly installed virtual server. By default, my server had only .NET 1.1 installed and nothing enabled for IIS extensions.

To change this I first downloaded and installed the .NET 3.5 runtime. Then, I proceeded to download and install the .NET 2.0 runtime to have both on the server.

The Puzzle Begins

During the 2.0 install though I got an error that said "Setup cannot continue because this version of the .NET Framework is incompatible with a previously installed one.  For more information, see http://support.microsoft.com/support/kb/articles/q312/5/00.asp"
image

This puzzled me at first but I did get the general hint, installing the .NET 3.5 runtime somehow already put the .NET 2.0 runtime in place. I didn't think it worked like this from the beginning, but obviously I was mistaken. To look at this situation further I entered the IIS 6.0 Web Service Extension tab and found another strange thing, only ASP.NET 2.0 and 1.1 were registered for Allow/Prohibited status.

image

My Theory

My theory is that ASP.NET 3.5 must still run on the core 2.0 libraries (or something went really wrong with my 3.5 install). To further test my theory I published and installed my first .NET 3.5 websites into IIS with the settings  shown above and it seems to be working.

Its also worth noting that looking under the ASP.NET tab of Website Properties it also does not show .NET 3.5 as an option, instead 2.0 and 1.1 are available just like in the extensions screen.

image

Solution?

I will continue to investigate this but it seems that once the framework 3.5 is installed simply allowed .NET 2.0 to run will do the trick for 3.5 websites

If anyone has any further information on this I would appreciate a reply to this post or an email.

8 comments:

Anonymous said...

Apparently .net 3.5 behaves like a service pack for .net 2.0 in iis, so your hunch is correct. i also found this http://www.thescripts.com/forum/thread764124.html

which confirms your findings as well.

Dmitry said...

Very good link, thank you for helping me confirm this.

I am very happy to be doing some development on the side as it lets me experience things from the bottom up (since no one supports me on the IT side) otherwise it would probably be another thing I did not know about ASP.NET 3.5 :).

Ben said...

Latest version of ASP.NET is still v2.0

So yes, you are installing .NET Framework v3.5 but ASP.NET version is staying the same.

Dmitry said...

Ben,

Thanks for the note, you are correct.

Neamat said...

I had the same problem and you confirmed it to me thanks.. But I'm still unable to run the .net 3.5 website that i built. It works fine from inside the VWD2008 but it gives me this error while trying from the real IIS:

Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.

I searched a lot and one of the forums entries said that I should build two application pools to run different .net framework applications. I have no idea how to do this and I don't even know if this is the right solution.
Could you please tell me what could be the problem.

Max said...

to neamat:
the problem is that u r trying to run both the 1.1 & 2.0 .net frameworks within the same application pool... here check this out http://www.codeproject.com/KB/server-management/VersionsDotnetFramework.aspx

peace...

Max said...

my beg...
here

sienum said...

http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx