title: How to publish asp website using IIS7
body: <p>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.</p>
  
  <p>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)</p>
  
  <p>I'm using tutorials like this one:
  <a href="http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0" rel="nofollow">http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0</a></p>
  
  <p>For those who may not want to click the link, here are the steps of this tutorial (just with mages and some additional info):</p>
  
  <p>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</p>
  
  <p>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.</p>
  
  <p>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?</p>
  
  <p>Hope anyone could explain me my mistakes.</p>
  
  <p>Thanks, Walt</p>