简体   繁体   中英

Cannot deploy asp.net application

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:

在此处输入图片说明

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: 在此处输入图片说明

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:

在此处输入图片说明

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM