web.config
<system.web>中配置
<customErrors mode="On" defaultRedirect="error.html"> <error statusCode="403" redirect="error.html" /> <error statusCode="404" redirect="error.html" /> </customErrors>