简体   繁体   中英

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

Using VS 2015 and Firefox browser. 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.

Thanks!

You'll want to look into the <customErrors /> of your web.config (example below):

<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"

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM