IIS防爆preSS HTTP错误401.2 - 未授权 [英] IIS Express HTTP Error 401.2 - Unauthorized

查看:215
本文介绍了IIS防爆preSS HTTP错误401.2 - 未授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾尝试在这个帖子,但我不能让Windows身份验证与IIS防爆preSS在视觉工作室2010年。现在我得到以下错误的工作:

I have tried the suggestions in this post but I can not get Windows Authentication working with IIS Express in Vision Studio 2010. Now I get following error:

下面是我的ApplicationHost.config文件条目:

Here are my applicationhost.config file entries:

...
<add name="WindowsAuthenticationModule" lockItem="false" />
...
<authentication>

    <anonymousAuthentication enabled="true" userName="" />

    <basicAuthentication enabled="false" />

    <clientCertificateMappingAuthentication enabled="false" />

    <digestAuthentication enabled="false" />

    <iisClientCertificateMappingAuthentication enabled="false">
    </iisClientCertificateMappingAuthentication>

    <windowsAuthentication enabled="true" />
</authentication>
...
<sectionGroup name="authentication">
    <section name="anonymousAuthentication" overrideModeDefault="Allow" />
    <section name="basicAuthentication" overrideModeDefault="Allow" />
    <section name="clientCertificateMappingAuthentication" overrideModeDefault="Allow" />
    <section name="digestAuthentication" overrideModeDefault="Allow" />
    <section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Allow" />
    <section name="windowsAuthentication" overrideModeDefault="Allow" />
</sectionGroup>

我的web.config:

My web.config:

<system.web>
    <authentication mode="Windows" /> 
</system.web>
<system.webServer>
    <security>
        <authentication>
            <anonymousAuthentication enabled="false" />
            <windowsAuthentication enabled="true" />        
        </authentication>
    </security>
</system.webServer>

这是.NET 4

推荐答案

请确保您有类似下面的ApplicationHost.config文件

Make sure you have something like below in your applicationhost.config file

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

这篇关于IIS防爆preSS HTTP错误401.2 - 未授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆