当我将ASP.NET MVC3应用程序设置到IIS服务器上时,出现此错误。
HTTP Error 403.18 - Forbidden The specified request cannot be processed in the application pool that is configured for this resource on the Web server.
然而,奇怪的东西来自下面。 详细的错误信息:
Module IIS Web Core Notification BeginRequest Handler PHP53_via_FastCGI Error Code 0x00000000 Requested URL http://localhost:80/index.php?q=OCOM/Account/LogOn Physical Path C:\inetpub\wwwroot\index.php Logon Method Not yet determined Logon User Not yet determined
是否有某种“错误configuration”,PHP引擎以某种方式将ASP.NET MVC3请求解释为一个PHP的? 坦率地说,我真的不明白什么地方出了问题,因为我的本地机器可以正常工作(使用Microsoft Web PI安装了PHP等)
我猜你已经在index.php的网站根目录下设置了URL Rewrite。
所以,如果你在一个子目录中运行你的MVC应用程序,你可以取消注册该子目录的index.php URL重写。
要做到这一点,只需打开IISpipe理器,点击您的网站下的子目录,并使用“filter:”框键入“重写”,它会让你进入URL重写configuration区域。
然后,您可能会看到列出的重写规则,您需要select(单击一次),然后点击右侧的“禁用规则”。
好?
查看该站点/目录的处理程序映射。 您应该看到一个PHP53_via_FastCGI条目。 这应该删除FastCGIModule。
…或者你可以添加到你的web.config
或者你可以添加到你的web.config
<handlers> <remove name="PHP53_via_FastCGI" /> </handlers>
这应该适用于任何处理程序。 你们中的一些人可能会得到不同的版本或不同的处理程序完成。 只需用“PHP53_via_FastCGI”replace它。 (例如PHP60_via_FastCGI)