【问题标题】:ASP.net MVC4 and Razor :Get 403 errorASP.net MVC4 和 Razor:得到 403 错误
【发布时间】:2013-01-14 03:27:32
【问题描述】:

我有同样的问题: 403 Forbidden when Deploying asp.net 4.0 MVC 3 site to IIS 7

我的配置相同。当我在我的电脑上工作并加热F5 时,没关系,这个网址可以看到网站:localhost:8754

但是当我尝试通过网络继续它时,我有一个403 错误。

我在IIS7 下运行,我的池应用程序是4.0

我的网站是VS2012 创建的示例。我没有更改任何内容。

【问题讨论】:

  • 我已经在配置文件的“system.webServer”中添加了这一行,但它安全吗?

标签: asp.net-mvc iis razor http-status-code-403


【解决方案1】:

将此添加到您的 web.config

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"></modules>
    <handlers>
      <remove name="UrlRoutingHandler"/>
    </handlers>
  </system.webServer>

http://www.iis.net/learn/get-started/introduction-to-iis/iis-modules-overview#Precondition

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-25
    • 2013-04-22
    相关资源
    最近更新 更多