简体   繁体   中英

How to publish asp website using IIS7

I am trying to host my web application in IIS7 (for testing purposes). I have checked tutorials how to do it, they are very similar, but i always get some errors. I guess i'm missing something, hope you could help me.

Things that i have now: 1. Installed IIS7 with asp net (the IIS welcome image is showing, so i guess its installed correctly) 2. Simple web application (only with Default.aspx and some other automatically generated files)

I'm using tutorials like this one: http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0

For those who may not want to click the link, here are the steps of this tutorial (just with mages and some additional info):

Step 1: From Visual Studio, publish your Web application. Step 2: Copy the published application folder to "C:\\intepub\\wwwroot" [default] folder. Step 3: From RUN - > inetmgr -> OK "TestWeb" is a recently pasted webapplication on your wwwroot folder. Step 4: We need to convert it to an application, just right click and then Click on "ConvertToApplication" as shown in the following picture: + How to create and assign application pools

Now about the errors i get when i'm trying to connect to the running Sample website: 1. If I'm using Framework 4.0 integrated application pool: HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list 2. If I'm using Framework 4.0 Classic application pool: HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler.

My guess is that something could be configured wrong in IIS7 or i might be publishing my web application not the way it has to be published, because they differ in tutorials that i am using. For now i am publishing, using File System option. Is it the right one for IIS7?

Hope anyone could explain me my mistakes.

Thanks, Walt

The answer for the questioner was to run the aspnet_regiis.exe -i from the framework directory

Below suggestions and comments leading to this answer :


I never had problems when publishing websites and webservices on IIS7 (for the moment) but I did a little research and according to the following link : http://forums.asp.net/post/3225843.aspx It is suggested that after switching the AppPool to Classic .NET AppPool, it may be required for you to uncomment a section in the web.config which is necessary for IIS7

Did you try that ?

For number HTTP:500.21 check this asp.net forum

"Looks like you have not installed the asp.net feature from within IIS in "Add/Remove windows component" so that all the regstration needed to run asp.net is not present in your configuration." from the page.

For number 404.17 please check the asp.net module if properly installed or not. If not then you might have to install manually. Check this thread .

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