gpt4 book ai didi

IIS Express 调试不再有效

转载 作者:行者123 更新时间:2023-12-04 21:16:45 24 4
gpt4 key购买 nike

我在 Windows 8.1 x64 上将 IIS Express 与 Visual Studio 2013 一起用于 WebAPI 2 应用程序(此处均为 en-US)。大约一个月前它工作得很好,但现在我在尝试调试应用程序时遇到错误。

如果我不以管理员身份运行 VS(同样,之前不需要这样做),我得到:

A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll

Additional information: Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\~AspAccessCheck_c00414062044.tmp' is denied.

此后出现第二个错误,或者如果我以管理员身份运行 VS 将是第一个错误:

A first chance exception of type 'System.Globalization.CultureNotFoundException' occurred in mscorlib.dll

Additional information: Culture is not supported.

如果我从 WebMatrix 3 运行相同的 WebAPI 应用程序,它运行时没有错误(无论是否以“管理员身份”运行)。

项目 IIS 配置设置:

<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort>46435</IISExpressSSLPort>
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
<IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>

我的应用程序也在 http://localhost:46436 上运行.

我还发现非常奇怪的是项目属性显示“IIS Express”并使用 http://localhost:46436/ 的 URL ,但在我看到的项目文件中:

  <ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>46435</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:46436</IISUrl>

这可以解释我的访问被拒绝的原因。无论我是否取消设置、保存并重新设置为使用 IIS Express(为所有用户存储它),<UseIIS>属性设置回 true。

编辑:看起来“使用 IIS”是正常的。我创建了一个新的 WebAPI 2 项目作为测试。它在 IIS Express OOTB 下运行良好。

最佳答案

我也有这个问题。最后不得不右键单击有问题的文件夹并为 IIS_IUSR 帐户添加访问权限。

如果这不会导致严重错误,您还可以通过 Debug -> Options -> Debugging 禁用此类问题的中断模式,并检查 Enable Just My Code (Managed Only) )

关于IIS Express 调试不再有效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30894681/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com