0

When I create a ASP.NET Web Application (using .net framework 4) in visual studio and I deploy it as is, I get the following exception:

enter image description here

Note that I am not doing any modifications to my application I select that project and right away I deploy it.

I am running IIS on Windows 7 Home Premium. So this error looks to me as if my version of IIS does not support the .net framework 4.0 .

The next thing I did was to find out what version of IIS I have. In order to do so I launched IIS Manager, clicked on help and then on about. The window that I got was: enter image description here

That looks to me as if I am using IIS 7.5

Why is it that a default asp.net application will not run in my IIS? when I create a similar application using a .net web application but this time with the .net framework 2.0 . IIS does not complain when I see it in the browser.


edit


Sorry I am new to asp. Ok I updated my application pool to V4.0 . after doing that I restarted the site and when I browse it I got a different error:

enter image description here

2
  • 1
    Have you setup the application pool for the site to use .NET 4.0? Commented Jan 18, 2012 at 15:41
  • No I have not. I get a different exception now. I will work on an update soon. Thanks so much for the help. Commented Jan 18, 2012 at 15:46

2 Answers 2

3

The app pool isn't setup for ASP.NET 4, look at the error message 'Version Information' you displayed, it's using 2.0. Change this to 4 in the 'Application Pools' option in the IIS Manager.

Sign up to request clarification or add additional context in comments.

1 Comment

that was definitely a problem. after doing that I got a different error. take a look at my edit. Thanks so much for the help.
0

From researching at the last error I found at that my ASP.net installation was not registered correctly. I tried the following and it worked.

run %windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe -i

that solved my problem

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.