.Net Framework 2.0 installed, but ASP.NET web apps still use Version 1.1

I recently tried to run some .Net 2.0 code on my testing web server (IIS 5). Now, my server has .Net Frameworks 1.1 and 2.0 installed, but when I tried to run some 2.0 code, I got a series of errors on the page with a small line at the bottom that said the page was executing under the .net 1.1 Framework.

I thought to myself, If the 2.0 Framework is installed, why won’t it just use that. So I open up the Internet Services Manager for IIS to see if there was anything there that could help me figure this little issue out. Well, as it turns out, you need to specify what framework a web uses to execute it’s code from within the IIS Manager console. These settings are found by right clicking on the target web site in the Manager console and selecting “properties”.

Now in the properties panel, select the ASP.Net tab. In this tab view you should see a form page containing a few fields and a couple buttons. The first field at the top of the form is labeled “ASP.Net Version” and has a drop down menu containing the available installed framework versions. Select the appropriate version you want to use to process asp.net pages for the web your working in and hit the “Apply” or “OK” button. That’s all there is to it! You can also specify different Frameworks for different webs that are hosted on the same server. One of the good things about the .Net Frameworks is that they install and run independently of each other.