简体   繁体   中英

visual studio 2015: suppress error in .net mvc application in production?

anytime there's an error, it shows the stack trace, is there a way to suppress this when the .net mvc application is deployed in production? I googled and searched through SO but couldn't find an option in web.config that I could turn on to suppress it.

You should set the the attribute to debug=false .

Go to Web.config, under <system.web> change it to <compilation debug="false"

尝试在webconfig中使用此标记:

<customErrors mode="on"/>    

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