1

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

Oak
  • 1,159
  • 3
  • 13
  • 21

2 Answers2

1

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 ?

Bren
  • 136
  • 1
  • 9
  • Hi, thanks for the reply. Yes i tried that, and retried some minutes ago, but the result is still the same + it is a simple asp net application and system.webserver block is almost empty: – Oak Mar 05 '12 at 22:12
  • 1
    It seems somebody had this problem a while ago : http://stackoverflow.com/questions/87107/how-do-i-fix-404-17-error-on-win-server-2k8-and-iis7 the original question was dealing with a 2.0 web application but people with 4.0 webapps posted some solutions at the bottom of the post – Bren Mar 05 '12 at 22:21
  • @Bren regiis is also one thing to try it out. – Mitul Mar 05 '12 at 22:23
  • Thank you both for the replies. The aspnet_regiis helped me. – Oak Mar 05 '12 at 22:47
0

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.

Mitul
  • 9,734
  • 4
  • 43
  • 60
  • Hi, thanks for the fast reply. Is that "Add/Remove windows component" in IIS features menu, i have problems finding it. ps. both links are the same i guess – Oak Mar 05 '12 at 22:09
  • Inside IIS features you will have to go to Word Wide Web Services and then find ASP.NET Check this site. http://learn.iis.net/page.aspx/472/how-to-install-aspnet-11-with-iis-on-vista-and-windows-2008/ – Mitul Mar 05 '12 at 22:14
  • If that doesn't work then you can uninstall IIS7 but just going to turn windows features on/off and then reboot and reinstall and try again. – Mitul Mar 05 '12 at 22:15
  • Hi, yes i have checked the developer features. Do i have to continue with Step 1: Install "IIS Metabase Compatibility" as i am using windows 7 and dont have server manager – Oak Mar 05 '12 at 22:26
  • You can I don't have idea about that. I did a select all on my machine. I don't know implications of doing so. – Mitul Mar 05 '12 at 22:41