当IIS 7部署的ASP.NET Web API应用给404 [英] ASP.NET Web API application gives 404 when deployed at IIS 7
本文介绍了当IIS 7部署的ASP.NET Web API应用给404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个ASP.NET Web API上运行时工作正常IIS前preSS与本地主机:1783
I have an ASP.NET Web API which works fine when running on "IIS Express" with localhost:1783
但是,当我未交使用IIS前preSS,然后preSS创建虚拟目录...
But when I uncross the "Use IIS Express" and then press "Create Virtual Directory"...
...我只是得到404错误:
...I just get 404 errors:
任何想法什么是错?谢谢!
Any ideas whats wrong? Thanks!
推荐答案
我不明白为什么,但像的这个答案,加入 runAllManagedModulesForAllRequests =真正的
并解决问题。
I don't understand why but like said in this answer, adding runAllManagedModulesForAllRequests="true"
did the trick.
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/> <-- this was here
<modules runAllManagedModulesForAllRequests="true"/> <-- this did the trick
</system.webServer>
如果谁能够解释为什么?
Anybody who can explain why?
这篇关于当IIS 7部署的ASP.NET Web API应用给404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文