オプション-1:
ファイルを編集\My Documents\IISExpress\config\applicationhost.config
し、windowsAuthenticationを有効にします。
<system.webServer>
...
<security>
...
<authentication>
<windowsAuthentication enabled="true" />
</authentication>
...
</security>
...
</system.webServer>
オプション2:
次のように、\ My Documents \ IISExpress \ config\applicationhost.configのwindowsAuthenticationセクションのロックを解除します
<add name="WindowsAuthenticationModule" lockItem="false" />
必要な認証タイプのオーバーライド設定を「許可」に変更します
<sectionGroup name="security">
...
<sectionGroup name="system.webServer">
...
<sectionGroup name="authentication">
<section name="anonymousAuthentication" overrideModeDefault="Allow" />
...
<section name="windowsAuthentication" overrideModeDefault="Allow" />
</sectionGroup>
</sectionGroup>
アプリケーションのweb.configに以下を追加します
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</configuration>
以下のリンクが役立つ場合があります:http:
//learn.iis.net/page.aspx/376/delegating-configuration-to-webconfig-files/
VS 2010 SP1をインストールした後、Windows認証を機能させるには、オプション1+2を適用する必要がある場合があります。さらに、IISExpressapplicationhost.configで匿名認証をfalseに設定する必要がある場合があります。
<authentication>
<anonymousAuthentication enabled="false" userName="" />
VS2015の場合、IISExpressアプリケーションホスト構成ファイルは次の場所にあります。
$(solutionDir)\.vs\config\applicationhost.config
プロジェクトファイルの<UseGlobalApplicationHostFile>
オプションは、デフォルトまたはソリューション固有の構成ファイルを選択します。