I want to redirect the user to my custom Access Denied page instead of showing the default Error message 401.2. when he doesn't have access to the folder.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.
Where to set the url of this page in web.config?
<customErrors defaultRedirect="ErrorPage.asp­x" mode="On">
<error statusCode= ...
Go to the complete details ...