Mvc Site 404 Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business asp.net mvc 404 error Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation asp.net mvc 404 page Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just 404 error mvc routing like you, helping each other. Join them; it only takes a minute: Sign up MVC 4 application giving a 404 when deployed up vote 6 down vote favorite I have an ASP.NET MVC 4 project using .NET 4.5 mvc diagnostics that I am trying to publish to IIS 7.0 using Visual Studio 2012. When I debug the application in IIS Express everything works wonderfully. When I publish it to the server, the MVC requests return 404. I have a few aspx pages on the site and they all work fine. Below is my routing scheme. It is boilerplate code: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id
Asp.net Mvc 5 Custom Error Page
= UrlParameter.Optional } ); Thanks. Edits: I got it! I had to add the following to system.webServer in my web.config: here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more mvc 5 404 about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow mvc 404 not found Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping http://stackoverflow.com/questions/16178821/mvc-4-application-giving-a-404-when-deployed each other. Join them; it only takes a minute: Sign up ASP.NET MVC 404 Error Handling [duplicate] up vote 98 down vote favorite 93 Possible Duplicate: How can I properly handle 404 in ASP.NET MVC? I've made the changes outlined at 404 Http error handler in Asp.Net MVC (RC 5) and I'm still getting the standard 404 error http://stackoverflow.com/questions/717628/asp-net-mvc-404-error-handling page. Do I need to change something in IIS? asp.net-mvc error-handling share|improve this question edited Mar 9 '11 at 20:23 Dan Dumitru 3,6581838 asked Apr 4 '09 at 19:13 Clearly 6541614 marked as duplicate by casperOne May 8 '12 at 13:31 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. 1 Here is a good read on this topic @ How to handle 404 Not Found errors effectively with ASP.NET MVC 4 –Yasser Nov 3 '12 at 12:03 add a comment| 6 Answers 6 active oldest votes up vote 111 down vote accepted Yet another solution. Add ErrorControllers or static page to with 404 error information. Modify you web.config (in case of controller). Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring http://serverfault.com/questions/239081/getting-404-error-on-mvc-web-site developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Getting 404 error on MVC web-site up vote 1 down vote favorite 1 I have an IIS7.5 web-site, on 404 error Windows Server 2008, with an ASP.NET MVC2 web-site deployed to it. The website was built in Visual Studio 2008, targeting .NET 3.5, and IIS 5.1 has been successfully configured to run it as well, for local testing. We've installed the world's simplest MVC application (the one which is created when you create a new MVC2 project in Visual Studio), and we are getting 404s on any page we try and access - e.g. Mvc Return 404