IIS Express上的基本身份验证 [英] Basic Authentication on IIS Express

查看:57
本文介绍了IIS Express上的基本身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索了一段时间,但似乎找不到答案.有禁用/启用匿名身份验证和Windows身份验证的方法.有谁知道如何在Visual Studio 2013中的IIS Express(8.0)上启用基本身份验证?

I've searched for a while now but I can't seem to find the answer. There are ways of disabling/enabling anonymous and windows authentication. Does anyone know how to enable basic authentication on IIS Express (8.0) in Visual Studio 2013?

推荐答案

更新ApplicationHost.config

ApplicationHost.config文件中,找到以下节点并更新值:

Update ApplicationHost.config

In the the ApplicationHost.config file, find the following nodes and update the values:

<sectionGroup name="authentication">
   <basicAuthentication enabled="false" /> <!-- set to false -->
</sectionGroup>

<!-- ... -->

<authentication>
   <section name="basicAuthentication" overrideModeDefault="Allow" /> <!-- set to allow -->
</authentication>

找到ApplicationHost.config

  • VS 2015 及以上(根据Joost的回答):

    Locate ApplicationHost.config

    • VS 2015 and above (per Joost's answer):

      sln_folder/.vs/applicationhost.config
      

    • VS 2013 及以下:

      %UserProfile%\Documents\IISExpress\config\applicationhost.config
      

      据我所知,没有办法仅对一个项目启用它.

      As far as I know, there is no way to enable it for only one project.

      这篇关于IIS Express上的基本身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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