【问题标题】:ASP.NET Development Server - 403 ForbiddenASP.NET 开发服务器 - 403 禁止
【发布时间】:2008-12-23 22:43:51
【问题描述】:

我正在设置一台新 PC,并安装了我的项目以供使用。它是一个 .NET Remoting 2.0 应用程序,在开发时使用 ASP.NET 开发服务器托管服务器端。当我向服务器发出请求时出现以下错误:

“远程服务器返回错误:(403) Forbidden。”

我检查了传入的凭据,一切似乎都是正确的。该调用对我的开发框来说都是本地的,并且最重要的是。代码没有改变,我所有的同事都工作正常。有什么想法吗?

【问题讨论】:

    标签: asp.net remoting


    【解决方案1】:

    好的。我找到了答案……不过一天中更好的部分。原来 403 错误是由我们过滤 IP 值的通道接收器提供商之一引发的。通道接收器提供程序是基于一些重大假设编写的。

    首先,它正在寻找调用机器的地址并将其与 ip 白名单进行比较。作者盲目地收集了列表中的第一个条目:

    Dns.GetHostEntry(machineName).AddressList[0].Address
    

    原来在我的新机器上,我启用了 IPv6,所以第一个条目实际上是 IPv6 条目。参考 MSDN 后,我发现 Address 属性现在“已过时”,原因很明显。

    【讨论】:

      【解决方案2】:

      错误子码是什么?

      403 - Forbidden. IIS defines several different 403 errors that indicate a more specific cause of the error:
      •   403.1 - Execute access forbidden.
      •   403.2 - Read access forbidden.
      •   403.3 - Write access forbidden.
      •   403.4 - SSL required.
      •   403.5 - SSL 128 required.
      •   403.6 - IP address rejected.
      •   403.7 - Client certificate required.
      •   403.8 - Site access denied.
      •   403.9 - Too many users.
      •   403.10 - Invalid configuration.
      •   403.11 - Password change.
      •   403.12 - Mapper denied access.
      •   403.13 - Client certificate revoked.
      •   403.14 - Directory listing denied.
      •   403.15 - Client Access Licenses exceeded.
      •   403.16 - Client certificate is untrusted or invalid.
      •   403.17 - Client certificate has expired or is not yet valid.
      •   403.18 - Cannot execute requested URL in the current application pool. This error code is specific to IIS 6.0.
      •   403.19 - Cannot execute CGIs for the client in this application pool. This error code is specific to IIS 6.0.
      •   403.20 - Passport logon failed. This error code is specific to IIS 6.0.
      

      【讨论】:

      • 这是关于 ASP.NET 开发服务器的,它不像 IIS 那样喜欢子代码。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-04-18
      • 2021-09-05
      • 2013-11-13
      • 1970-01-01
      • 2016-06-11
      • 2012-06-18
      • 2017-06-22
      相关资源
      最近更新 更多