asp.net MVC路由问题

时间:2011-08-13 12:20:14

标签: asp.net asp.net-mvc asp.net-4.0 asp.net-routing

我创建了一个网站bulkpedia.com 在这方面,我使用了ASP.NET Routing机制

{type}/{query}

只要有包含句点的查询,就会显示404错误

e.g。 http://bulkpedia.com/web/fb.com

请帮我解决。

提前致谢

2 个答案:

答案 0 :(得分:0)

尝试在web.config

中坚持这一点
<system.webServer>
  <modules runAllManagedModulesForAllRequests="True" >

  </modules>
<system.webServer>

答案 1 :(得分:0)

试试这个。

<system.webServer>     
  <modules >     
    <remove name="UrlRoutingModule-4.0" />     
    <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />     
    <remove name="Session"/>     
    <add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition=""/>     
  </modules>     
</system.webServer>     

参考:http://www.heartysoft.com/aspnet-routing-iis7-remember-modules

如果这也不起作用,我相信它可能是您的IIS或其他机器设置。

相关问题