Describe use of error pages in ASP.NET.- Error pages are used when exceptions are outside the scope of the application and the application can’t respond directly to these exceptions.
- These types of exceptions are identified by HTTP response codes, which IIS can respond to by displaying custom error pages listed in your application’s Web.config file.
- Some of them even use the custom error pages.
- They handle the HTTP exceptions such as the page not found,unauthorized access etc.
They can be specified at two places: a. customError section of the web.config file. b. errorPage attribute of the directive @Page to display the error page for the generation of the error on a particular page.
- There is a default error page which gives a brief description of the error along with the line number where the error has occurred.
|