Indicate the error page in web.config
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <customErrors defaultRedirect="Error.aspx" mode="On" /> </system.web> </configuration> <%-- <%@ Page Language="VB" %> <html> <head> <title>Error page</title> </head> <body> <h1>Error page</h1> Error originated on: <%=Request.QueryString("aspxerrorpath") %> </body> </html> --%>