【问题标题】:JetBrain Rider , Access denied when using IIS Express with Windows AuthenticationJetBrain Rider,使用带有 Windows 身份验证的 IIS Express 时访问被拒绝
【发布时间】:2017-08-08 06:31:51
【问题描述】:

我的项目启用了 Windows 身份验证。当我从 Rider 运行它时,它总是提示我“拒绝访问”。当我通过 Visual Studio 运行它时,它工作正常。

我该如何解决这个问题?

【问题讨论】:

  • 您是否尝试过以管理员身份运行 Rider
  • 我遇到了同样的问题。 IIS express 似乎允许匿名访问该网站。我正在考虑将其配置为强制身份验证。
  • 你不能提供你的 web.config

标签: windows-authentication iis-express rider


【解决方案1】:

导航到:<project>.idea/config/applicationhost.config

找到标签<authentication>并启用<windowsAuthentication>标签,如下所示:<windowsAuthentication enabled="true">

我的看起来像这样:

<windowsAuthentication enabled="true">
    <providers>
        <add value="Negotiate" />
        <add value="NTLM" />
    </providers>
</windowsAuthentication>

【讨论】:

  • 酷,它的工作原理谢谢!但是为什么 Rider 不尊重 web.config,我想知道
  • 这现在在.vs/config/设置中,所以他们也跟着把它放在.idea/config/设置stackoverflow.com/a/49530114/3018212
【解决方案2】:

JetBrains 正在进行的工作,请参阅 issue RIDER-15230

只是在 @RyanDawkins answer 的基础上使用 GUI 等效

步骤

  1. 右键单击网络应用启动的项目
  2. 选择属性...
  3. 在 Modal 中,在 Properties > Web 下有一个 复选框 用于 Windows 身份验证

截图

这类似于Visual Studio的做事方式,只是将设置保存在{SolutionFolder}/.idea/config而不是{SolutionFolder}/.vs/config

【讨论】:

    【解决方案3】:

    &lt;project&gt;.idea/config/applicationhost.config
    我必须做两件事:
    设置:&lt;windowsAuthentication enabled="true"&gt;
    设置:&lt;anonymousAuthentication enabled="false"&gt;

    【讨论】:

      猜你喜欢
      • 2016-03-15
      • 2011-04-06
      • 1970-01-01
      • 1970-01-01
      • 2017-11-28
      • 2011-06-13
      • 1970-01-01
      • 2018-01-06
      • 2019-12-12
      相关资源
      最近更新 更多