Asp.net Resource Not Found Error Page
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
The Resource Cannot Be Found. Server Error In '/' Application
Learn more about Stack Overflow the company Business Learn more about hiring developers asp.net mvc 5 the resource cannot be found or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Server Error In '/' Application. The Resource Cannot Be Found. Mvc 4
Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up The resource cannot be found (Error in mvc the resource cannot be found 404 ASP.NET MVC 5) up vote 1 down vote favorite I've manually added a view in the Home folder called "Test.cshtml". When I opened that view in the browser it shows me the error: The resource cannot be found. I tried the following solutions but still getting that error: 1- Right click on The Project Name > Properties > Specific Page > set it to: "Home/Test". 2- In server error in '/' application. the resource cannot be found mvc 5 RouteConfig class > RegisterRoutes method > Default MapRoute > set: controller = "Home", action = "Test". c# asp.net-mvc model-view-controller view share|improve this question edited Oct 4 '14 at 11:45 asked Oct 4 '14 at 11:39 kareemborai 1541310 add a comment| 1 Answer 1 active oldest votes up vote 12 down vote accepted You need to add an Action called Test in your Home controller. public class HomeController : Controller { public ActionResult Test() { return View(); } } Visual Studio can help you generating the view for the action, right click on the Test method and Add View... You can read more about Routing and Attribute Routing in this MSDN article. Also a good read - How URLs Are Matched to Routes share|improve this answer edited Jan 25 at 18:44 answered Oct 4 '14 at 11:50 Ofiris 3,59221033 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
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
How To Solve The Resource Cannot Be Found
expect such is the case with some other frameworks/servers) we would just configure the resource cannot be found. c# our custom error pages in one place and it would just work, no matter how/where the error was raised. Something
Asp.net Mvc Custom Error Page
like:
404 Page Not Found
I created a new ASP.NET MVC 5 application using the standard template in 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 insideWebsites Community Support ASP.NET Community Standup ForumsHelp Web Forms:Guidance Videos Samples Forum Books Open Source Older Versions - Getting Started Getting StartedGetting Started with ASP.NET 4.5 Web Forms and Visual Studio 20131. Getting https://www.asp.net/hosting/tutorials/displaying-a-custom-error-page-cs Started with Web Forms and Visual Studio2. Create the Project3. Create the Data https://insomniacgeek.com/how-to-fix-resource-not-found-error-with-your-asp-net-mvc-project/ Access Layer4. UI and Navigation5. Display Data Items and Details6. Shopping Cart7. Checkout and Payment with PayPal8. Membership and Administration9. URL Routing10. ASP.NET Error HandlingIntroduction to ASP.NET Web FormsCreating a Basic Web Forms Page in Visual Studio 2013Creating ASP.NET Web Projects in Visual Studio 2013Code Editing ASP.NET Web Forms in Visual Studio 2013ASP.NET Scaffolding the resource in Visual Studio 2013ASP.NET Web Forms (dotnetConf 2014)Using Page Inspector for Visual Studio 2012 in ASP.NET Web FormsVisual Studio 2012 Hands On LabsWhat's New in ASP.NET and Web Development in Visual Studio 2012What's New in Web Forms in ASP.NET 4.5Using Page Inspector in Visual Studio 2012Monitoring and TelemetryRoutingASP.NET 4 - RoutingASP.NET 4 - Defining RoutesASP.NET 4 - Constructing URLs from RoutesASP.NET 4 - Accessing URL Parameters in a the resource cannot PageJavaScript and Client FrameworksASP.NET 4 - Microsoft Ajax OverviewASP.NET AJAX Control Toolkit (maintained by DevExpress)Working with Data Getting Started with ASP.NET 4.5 Web FormsModel Binding and Web Forms in Visual Studio 20131. Retrieving and Displaying Data2. Updating, Deleting, and Creating Data3. Sorting, Paging, and Filtering Data4. Integrating JQuery UI Datepicker5. Using Query String Values to Filter Data6. Adding Business Logic LayerASP.NET 4 Web Forms - Validating User Input in a PageASP.NET 4 Web Forms - State ManagementASP.NET Data Access - Recommended ResourcesServer Data ControlsASP.NET 4 Data-Bound ControlsASP.NET 4 Data Source Controls OverviewASP.NET 4.5 Chart ControlRecommended Resources for ASP.NET Data AccessSecurity, Authentication, and Authorization Getting Started with ASP.NET 4.5 Web FormsASP.NET IdentityCreate a secure ASP.NET Web Forms app with user registration, email confirmation and password reset (C#)Create an ASP.NET Web Forms app with SMS Two-Factor Authentication (C#)OWIN and KatanaPerformanceUsing Asynchronous Methods in ASP.NET 4.5[Build 2014] Deep Dive: Improving Performance in Your ASP.NET App (Levi Broderick)ASP.NET 4 - Web Forms Performance OverviewASP.NET 4 - Web Forms Caching OverviewASP.NET 4 - Caching Web Forms PagesASP.NET 4 - Caching Portions of a Web Forms PageDeploymentGet Started with ASP.NET and Azure App ServicesDeploy a Web App in Azure App ServiceWeb Deployment Overview for Visual Studio and ASP.NETASP.NE
downloaded a ASP.NET MVC project, it will fail to start. All you get is a 404 error, or a Resource not found. Here’s how to fix that. Go to the properties page of the Web project and select the Web tab. In the Start Action section, set it to Specific Page, but leave the textbox empty. Post navigationPreviousNext 5 thoughts on “How to fix Resource not found error with your ASP.NET MVC project” I'm new to the ASP.NET MVC projects. I'm facing some problem. while running project it shows like: server error ‘/' application . the resource can't find. kavi , July 16, 2012 at 10:35 Excellent! JF , January 7, 2013 at 20:10 HI Magnus Johansson,I try the same but not working. Getting same Error resource not found.Thanks, Rahul Rahul , March 12, 2014 at 18:58 Thank You very much Great Your suggestion worked out. Since I do not want to add unit testing in the project and MVC application was giving an error to me. This solution worked."Go to the Project properties page of the Web project and select the Web tab. In the Start Action section, set it to Specific Page, but leave the textbox empty." Junaid , May 8, 2014 at 07:49 Thanks a lot. It works perfectly now. AnHund , June 16, 2014 at 11:24 Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *CommentName * Email * Website Sponsors Search Google++Magnus Johansson Geek, developer LinkedinMSDN ProfileMSDN Profile StackExchange Microsoft MCP TagsASP.NET ASP.NET MVC Azure CAML CDN Custom Action DotnetRocks Error git HP Hyper-V IIs Install Intel Galileo IoT Microsoft Azure Microsoft Outlook Microsoft Surface MOSS MSI MVVM Light NuGet Performance PowerShell Raspberry PI SharePoint 2007 SharePoint 2010 SPGridView SQL SQL Server SQL Server 2008 ssh Stack Overflow Update Updates Visual Studio Visual Studio 2010 VNC Windows Windows 7 Windows Gadget Windows Phone 7 Windows Server 2008 R2 Core Windows Update WP7 ArchivesApril 2016(1)October 2014(2)September 2014(2)August 2014(4)December 2013(2)October 2013(1)May 2013(2)October 2012(2)September 2012(1)August 2012(3)July 2012(1)February 2012(2)January 2012(1)October 2011(1)May 2011(1)March 2011(1)January 2011(2)October 2010(3)September 2010(1)August 2010(3)July 2010(3)June 2010(1)May 2010(2)April 2010(4)February 2010(3)January 2010(2)December 2009(4)November 2009(7)October 2009(3)September