How do I enable custom errors in web config?
Category:
technology and computing
web development
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web. config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
Also, how do I enable custom errors in web config MVC?
Go to Web.config file
- There are two Web. config files in an ASP.NET MVC Project.
- Go to Web. config file at the root directory.
- Go to Root Directory, Web. config, then System. Web, and click CustomError. Set it to On. Add this line. <customErrors mode="On"> </customErrors>
- Create a backup copy of the Web.
- Open the Web.
- In the Web.
- Set the customErrors mode to off as follows:
- Save the Web.
- When you run the problematic request, ASP.NET now returns a detailed error message that describes the specific nature of the problem.
- Reenable <customErrors>.
Regarding this, where is custom error in web config?
Configure the <customErrors> element
- Find the <system.web> config section in your web.config file.
- Add the following <customErrors> section to handle the 500 error code: <customErrors mode="RemoteOnly"> <error statusCode="500" redirect="~/error-pages/500" /> </customErrors>
- Save and close the web. config file.
How To
- Open Internet Information Services (IIS) Manager:
- In the Connections pane, expand the server name, expand Sites, and then navigate to the Web site or application that you want to configure custom error pages for.
- In the Home pane, double-click Error Pages.
- In the Actions pane, click Add