Home > start page > mvc start page error

Mvc Start Page 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 visual studio change start page policies of this site About Us Learn more about Stack Overflow the visual studio set start page company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users how to remove start page in visual studio 2013 Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes clear start page visual studio a minute: Sign up Visual Studio ASP.Net MVC undo set as start page action up vote 60 down vote favorite 11 I have an web application that I'm working on, it was working fine until my curiosity got the better of me and I right-clicked on a view and chose Set As Start Page option. Now, whenever I run my application

Bash Undo Set -x

it takes me to the Resource Not Found error page. I have the default register route set in my Global config route which was working fine before. I notice that the URL now reads: http://localhost:1234/Views/User/Login.aspx instead of http://localhost:1234/ like it was before. I'm not sure how to undo this action or what was changed, I've looked in my web.config file but I'm not sure what to look for exactly, Help is appreciated. .net asp.net asp.net-mvc visual-studio share|improve this question asked May 12 '10 at 18:46 kingrichard2005 2,5691562103 add a comment| 2 Answers 2 active oldest votes up vote 104 down vote accepted you can set it to open as blank in the Specific Page option in the project properties. share|improve this answer edited Jun 2 '10 at 13:35 answered May 12 '10 at 18:48 Glennular 11.4k54169 5 Just to clarify this - select Specific Page and then leave the text box blank, don't enter "/" otherwise the project will start-up at localhost:1234// –dwynne Jun 2 '10 at 8:03 thanks, made the update. –Glennular Jun 2 '10 at 13:35 add

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies

Asp.net Mvc Custom Error Page

of this site About Us Learn more about Stack Overflow the company Business visual studio 2015 custom start page Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges visual studio start page Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: http://stackoverflow.com/questions/2821796/visual-studio-asp-net-mvc-undo-set-as-start-page-action Sign up Undoing “Set as Start Page” up vote 12 down vote favorite I set one of my ASP.net pages to the default start page in Visual Studio. This results in a 404 error when I try to debug my project. How do I clear this? Thanks, Barry visual-studio asp.net-mvc-2 share|improve this question asked Dec 11 '11 at 12:46 Baz 1,327945120 add a http://stackoverflow.com/questions/8464070/undoing-set-as-start-page comment| 1 Answer 1 active oldest votes up vote 16 down vote accepted Right click the MVC project and select properties. Go to the Web tab. Under Start Action, select either Current Page or Don't open a page. share|improve this answer answered Dec 11 '11 at 12:48 danludwig 30.6k1198185 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged visual-studio asp.net-mvc-2 or ask your own question. asked 4 years ago viewed 3859 times active 4 years ago Linked 0 View as start page Related 587How to “Add Existing Item” an entire directory structure in Visual Studio?580What are the various “Build action” settings in Visual Studio project properties and what do they do?387How do I add an existing directory tree to a project in Visual Studio?683ASP.NET Web Site or ASP.NET

you're not alone. It's surprisingly difficult to do this correctly, not helped by the fact that some errors are handled by ASP.NET and others by IIS. Ideally (and I expect such is the case with some other frameworks/servers) we http://benfoster.io/blog/aspnet-mvc-custom-error-pages would just configure our custom error pages in one place and it would just work, https://weblog.west-wind.com/posts/2013/aug/15/iis-default-documents-vs-aspnet-mvc-routes no matter how/where the error was raised. Something like: Custom 404 error pages When a resource does not exist (either static or dynamic) we should return a 404 HTTP status code. Ideally we should return something a little friendlier to our site visitors than the error pages built in start page to ASP.NET/IIS, perhaps offering some advice on why the resource may not exist or providing an option to search the site. For the purposes of this blog post, my custom 404 page is very simple, but you can see some really nice examples here. 404 Page Not Found

404 Page Not Found

I created a new ASP.NET MVC 5 application using the standard template in mvc start page Visual Studio. If I run the site and try to navigate to a resource that does not exist e.g. /foo/bar, I'll get the standard ASP.NET 404 page with the following information: Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /foo/bar Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.33440 Not exactly friendly, is it? In this case the error was raised by ASP.NET MVC because it could not find a matching controller and/or action that matched the specified URL. In order to set up a custom 404 error page add the following to web.config inside : I've set mode="On" so we can view the custom errors pages locally. Generally you would only want to display these in production so would set mode="RemoteOnly". Now if I navigate to /foo/bar once more I see my custom error page. However, the URL is not /foo/bar as I'd expect. Instead ASP.NET issued a redirect to /404.html?aspxerrorpath=/foo/bar. Also if I check the HTTP status code of the response, it's 200 (OK). This is very wrong indeed. Not only is is misleading as w

by: ASPOSE - the market leader of .NET and Java APIs for file formats – natively work with DOCX, XLSX, PPT, PDF, images and more Rick Strahl @RickStrahl Posts - 1080 Comments - 13820 RSS Feed Rick's Sites Rick's GitHub Projects Rick's FoxPro Web Log West Wind Message Board CodePaste.net GeoCrumbs.net Rick's Products Markdown Monster WebSurge Html Help Builder Web Monitor Find this content useful? Consider making a small donation to show your support. Tweets by @RickStrahl IIS Default Documents vs. ASP.NET MVC Routes August 15, 2013 - from Hood River, OR 5 comments Tweet Here's a question that I've quite a few times over the years and that takes me a minute to remember myself every time I try to use a static Default document in an ASP.NET MVC application - as I often do for demos. Suppose you have a static index.htm page in your project, have IIS configured to include index.htm as your default document (as it is by default) and you want it to come up when the browser navigates to the default url of your site or virtual directory. Now when you create a new empty or basic MVC project and leave everything set at the default settings and you go to: http://localhost:30735/ you'll unpleasantly find: So why is IIS not finding your default resource? The file exists and using: http://localhost:30735/index.htm works, so what's the deal? ASP.NET MVC takes over URL management and by default the routing is such that all extensionless URLs are controlled by the extensionless Url handler defined in web.config: This handler routes all extensionless URLs into ASP.NET's routing mechanism which MVC then picks up to define its internal route handling. Since http://localhost:30735/ is an extensionless URL it's treated like any other MVC routed URL and tries to map to a configured routing endpoint/controller action. ASP.NET MVC tries to map the U

 

Related content

mamp start page error

Mamp Start Page Error table id toc tbody tr td div id toctitle Contents div ul li a href Mamp Localhost Not Working a li li a href Mamp Mysql Server Won t Start a li ul td tr tbody table p p p p p p