由于查询字符串在IIS上部署MVC后获取错误404 [英] Getting Error 404 after deploying MVC on IIS due to query string
本文介绍了由于查询字符串在IIS上部署MVC后获取错误404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚在我的IIS上部署了一个MVC应用程序,并且似乎遇到了任何带有查询字符串的URL的问题。
I just deployed an MVC app on my IIS and seem to be having issues with any URL with query string.
如果我打开 http:// serverip / app / controller / action ,它运行正常但是如果我打开 http:// serverip / app / controller / action / id ,我收到错误404.
If I open "http://serverip/app/controller/action", it works fine but if I open "http://serverip/app/controller/action/id", I get error 404.
我不知道该怎么办。我访问的一些链接没有帮助,也许,我不理解解决问题的说明。
I don't know what to do. Some links I visited did not help, perhaps, I don't understand the instructions to resolving the issue.
请帮忙。
推荐答案
这通常是由于web.config中的以下缺失引起的:
This is quite often caused by the following missing from the web.config:
<system.webserver>
<modules runAllManagedModulesForAllRequests="true"/>
这篇关于由于查询字符串在IIS上部署MVC后获取错误404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文