简体   繁体   English

如何从Visual Studio 2015中启用IIS Express中的详细错误

[英]How can I enable detailed errors in IIS Express from within Visual Studio 2015

Using VS 2015 and Firefox browser. 使用VS 2015和Firefox浏览器。 When my code runs into an error I see it in the Output window, but would prefer seeing it in the browser. 当我的代码遇到错误时,我会在“输出”窗口中看到它,但希望在浏览器中看到它。 Right now all I get is a 500 error with no stack. 现在,我得到的只是一个没有堆栈的500错误。

Thanks! 谢谢!

You'll want to look into the <customErrors /> of your web.config (example below): 您需要查看一下web.config<customErrors /> (下面的示例):

<configuration>
   <system.web>
      <customErrors defaultRedirect="GenericError.htm"
                    mode="RemoteOnly">
         <error statusCode="500"
                redirect="InternalError.htm"/>
      </customErrors>
   </system.web>
</configuration>

See also this previous SO answer: CustomErrors mode="Off" 另请参见此先前的SO答案: CustomErrors mode =“ Off”

Source: https://msdn.microsoft.com/en-us/library/h0hfz6fc(v=vs.71).aspx 来源: https : //msdn.microsoft.com/en-us/library/h0hfz6fc(v=vs.71).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IIS Express“指定的端口正在使用中”Visual Studio 2015 - IIS Express 'The specified port is in use' Visual Studio 2015 如何使用Visual Studio 2015在IIS Express 10中指定HTTPS端口号 - How to specify the HTTPS port number in IIS Express 10 with Visual Studio 2015 Visual Studio 找不到 IIS Express - Visual Studio can't find IIS Express 是否可以在Visual Studio 2015的其他端口中发布asp.net Web API? IIS不是IIS Express - Is it possible to publish asp.net web api in a different port in Visual Studio 2015 ? IIS not IIS Express 如何在Visual Studio 2015中管理EF 6迁移? - How can I manage EF 6 migrations in visual studio 2015? 如何检查进程是否由 Visual Studio &gt; 2015 启动 - How can I check if a process was started by Visual Studio > 2015 如何在.NET Core,C#6和Visual Studio 2015中使用本地IIS? - How do I use a Local IIS with .NET Core, C# 6 and Visual studio 2015? 在带有 SpaServices 和 Visual Studio 的 IIS Express 中启动时,如何防止我的本地主机端口在调试时发生变化? - How do I prevent my localhost port from changing while debugging when launching in IIS Express with SpaServices and Visual Studio? 从Visual Studio 2015发布SQL Server Express - Publish SQL Server Express from Visual Studio 2015 如何启用颜色选择器C#WPF Visual Studio 2015 - How to enable color picker c# wpf Visual Studio 2015
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM