Unable to run web application for .Net framework 2.0, 3.5 in IIS 7.5

iis-7.5netwindows 7

I am having DELL laptop with Windows 7 professional, IIS 7.5.

I have installed .Net framework 2.0, 3.5, 4.0.

Some of my old asp.net applications are built on framework 2.0 and 3.5.
I tried configuring the application in IIS but it is not showing me framework settings. The only thing i can set is the application pool but it is showing only 4.0.

Anyhow, i configured the application for 4.0. When i try to access the application i am getting error message in the browser.

Software Genius Inc

When i try to execute it from Visual Studio 2008 i am getting the following error.

Software Genius Inc

Can anybody help me out resolve this issue.

Best Answer

For one thing, you should re-register .NET 2.0 and 3.5 for IIS (in the select box of the application pool settings the only choices will be 2.0 and 4.0 - and the non managed setting - because .NET 3.x is basically the "same" as 2.0 with quite a few libraries added, but 2.0 should definitely be there).

You can try

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i -enable

or google "register .net 2.0 iis 7.5" or "aspnet_regiis" directly - this will give you a lot of information.

Secondly, your application is not running under 4.0 because the web.config is not configured properly (it says so in your error description). You have a duplicate section somewhere (it's too small to read for my eyes). Check this and make sure the web.config is valid.