2011-11-20
往IIS 7.5的Application Pools中添加ASP .NET v4.0
标签:.NET, IIS如果你的网站/WCF Service是使用ASP .NET 4.0编写的,但是在你的IIS的Application Pools中没有ASP .NET v4.0,那么你可能会在访问该服务上相关页面时遇到如下错误:
HTTP Error 404.3 – Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. Detailed Error InformationModule StaticFileModule.
当然,出现上述错误的原因可能是多种多样的。不过如果是由于IIS中没有ASP .NET v4.0的Application Pool造成的,你可以通过如下方式解决:
1. 找到“开始 -> 所有程序 -> Microsoft Visual Studio 2010 -> Visual Studio Tools ->Visual Studio Command Prompt (2010)”,点击右键,选择“Run as Administrator(以管理员权限运行)”
2. 在打开的命令行窗口中,运行“aspnet_regiis.exe -i”(不包含引号)
3. 再访问该页面试试看,如果还是同样错误的话,可以考虑重启一下IIS
本文可以自由转载,转载时请保留全文并注明出处:
转载自仲子说 [ http://www.wangzhongyuan.com/ ]
原文链接:http://www.wangzhongyuan.com/archives/884.html