【问题标题】:asp.net MVC routing problemasp.net MVC路由问题
【发布时间】:2011-08-13 12:20:14
【问题描述】:

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

{type}/{query}

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

例如http://bulkpedia.com/web/fb.com

请帮我解决。

提前致谢

【问题讨论】:

  • 你用的是什么版本的iis?
  • 好像和this question一样的问题

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


【解决方案1】:

尝试将其粘贴到您的 web.config 中

<system.webServer>
  <modules runAllManagedModulesForAllRequests="True" >

  </modules>
<system.webServer>

【讨论】:

    【解决方案2】:

    试试这个。

    <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 或其他机器设置。

    【讨论】:

      猜你喜欢
      • 2013-11-13
      • 2011-11-30
      • 2013-06-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多