A couple of days ago I was deploying a web application written in VS 2010 to the newly created virtual machine. The virtual machine is running on Microsoft Windows Server 2008. Initially, I received the error message
"The requested content appears to be script and will not be served by the static file handler."
I did some research and found out that I should change the application pool from integrated to classis. I did that, and then I received another error message
"HTTP Error 500.22 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode."
I read some article and someone suggest that we should include this line
<validation validateIntegratedModeConfiguration="false" />
in the web.config file. Run the application and get a different error message,
"HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list".
I don't remember how I get rid of the error but I received another error message
"HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler."
Finally, I started to realize that the IIS and ASP.NET were not installed correctly. I found the solution to my puzzle on MSDN, the work around is manually registering ASP.NET by running the ASP.NET IIS Registration tool. For more information, see ASP.NET IIS Registration Tool (Aspnet_regiis.exe). I hope you all will find this information useful.
Running Web Applications on Windows Server 2008 with IIS 7.0 and Visual Studio