Visual Studio - 运行 dot net Web 应用程序会在“/”应用程序中引发服务器错误

问题描述 投票:0回答:1

构建成功,但在 Visual Studio 中以调试模式运行应用程序时,它会在“/”应用程序中抛出服务器错误。

运行时错误 描述:处理您的请求时发生异常。此外,在执行第一个异常的自定义错误页面时发生了另一个异常。请求已终止。

c# .net visual-studio web-config
1个回答
0
投票

问题可能是由于 web.config 中的某些设置造成的。

  1. 要了解确切的问题,请设置 customErrors mode="Off"

     <customErrors mode="Off" defaultRedirect="~/Error" />
    
  2. 就我而言,问题是因为

    <sessionState>
    部分。通过删除 会话状态部分完全,问题已解决。

© www.soinside.com 2019 - 2024. All rights reserved.