【发布时间】:2017-06-14 13:53:31
【问题描述】:
我开发了一个简单的 ASP.Net MVC 4 应用程序,使用 Windows 身份验证在我们公司的本地网络上运行。在 IIS 上部署时它工作正常。但是如果我通过 Visual Studio 运行应用程序,我会收到错误消息
这是我的 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>
为了调试,应用程序配置为使用“本地 IIS Web 服务器”运行,并在应用程序的“属性”->“Web”选项卡中选中“使用 IIS Express”选项。
【问题讨论】:
-
可能是文件夹的权限问题。尝试向 IIS 用户或所有人授予应用程序托管文件夹的权限
标签: c# asp.net asp.net-mvc iis