web.config: custom error with default redirect and mode
<configuration> <system.web> <customErrors defaultRedirect="userError.aspx" mode="RemoteOnly"> <error statusCode="404" redirect="pagenotfound.aspx" /> </customErrors> </system.web> </configuration>