私は、Windows認証を使用して当社のローカルネットワーク上で実行する単純なASP.Net MVC 4アプリケーションを開発しました。 IIS上に展開するとうまく動作します。しかし、私は、Visual Studioを介してアプリケーションを実行する場合、私はここでエラーメッセージHTTPエラー401.0 - 不正なエラーメッセージ
を取得し、私のWeb.Configファイルが
デバッグするため<system.web>
<authentication mode="Windows" />
<roleManager defaultProvider="WindowsProvider" enabled="true" cacheRolesInCookie="false">
<providers>
<add name="WindowsProvider" type="System.Web.Security.WindowsTokenRoleProvider" />
</providers>
</roleManager>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime maxUrlLength="32767" maxQueryStringLength="32767" targetFramework="4.5" />
</system.web>
<system.webServer>
<modules>
<!--<remove name="FormsAuthenticationModule" />-->
</modules>
<security>
<requestFiltering>
<requestLimits maxUrl="32767" maxQueryString="32767" />
</requestFiltering>
</security>
どのように見えるかで、アプリケーションが設定されています[アプリケーションのプロパティ] - [Web]タブで[IIS Expressを使用する]オプションをオンにした状態で[ローカルIIS Webサーバー]を使用して実行する。
は、フォルダのアクセス権の問題である可能性があります。 IISユーザーまたは誰にでもアプリケーションがホストされているフォルダにアクセス許可を与えてみてください – Riad