Reputation: 1
I am trying an sample application in Asp.Net MVC 2 Application given in http://www.codeproject.com/KB/aspnet/aspnet_mvc_tutorial.aspx
But i am getting the error as below
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: /Views/PersonalInformation/Index.aspx
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
Please let mw know wat is the problem
Upvotes: 0
Views: 329
Reputation: 7979
The problem is the requested url. In an ASP.NET MVC application, the url corresponds to a controller action instead of the aspx page. See this link for an explanation: http://www.asp.net/LEARN/mvc/tutorial-02-cs.aspx.
The url should be something like http://localhost:xxxx/PersonalInformation (where xxxx is your port number)
To avoid getting this error everytime you start up your website through Visual Studio. Go to the properties of your web project and under the Web tab there is a property called Start URL. Change this to http://localhost:xxxx/ or something that is a valid MVC route.
Upvotes: 1
Reputation: 2203
Are you deploying to Cassini or IIS 6. Take a look at these articles
http://guyellisrocks.com/coding/deployed-asp-net-mvc-app-gives-404-on-about-page/
MVC runs fine in Cassini but requires some config modifications to run in IIS. I am still evaluating it in Cassini so i havent crossed that bridge yet but this info should help.
Upvotes: 0