Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ActionResult Notfound()
- {
- Response.StatusCode = 404;
- Response.StatusCode = 500;
- return View();
- }
- <system.webServer>
- <httpErrors errorMode="Custom" existingResponse="Replace">
- <remove statusCode="404" subStatusCode="-1" />
- <error statusCode="404" path="/Home/Notfound" responseMode="ExecuteURL" />
- <remove statusCode="500" subStatusCode="-1" />
- <error statusCode="500" path="/Home/Notfound" responseMode="ExecuteURL" />
- </httpErrors>
- </system.webServer>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement