I’m just starting out with ASP.NET, all my prior experience has been with desktop programming. VS2010 SP1 and I’m looking at Microsoft’s tutorial for a music store. I’m at the point of trying to make a hello, world page–but it’s just returning a 404.
Win 7 64-bit, IIS is installed and working for HTML, I have a static page I wrote that is served up correctly but now I want the server to do something useful.
When I hit the F5 in VS the ASP.NET development server shows up in the taskbar like it’s supposed to but all I get is a 404. Note that this is NOT the 404 from IIS, it looks very different. That says to me that I’m connecting to the ASP.NET server and not the IIS server.
I’m pretty sure it’s a configuration issue somehow (there’s so little else that I have a hard time picturing there being any other error) but Google isn’t turning up anything relevant. Where should I be looking?
Re: The comments–it’s reaching the server as I get back a 404 page, not a server can’t be found error.
The tutorial:
http://mvcmusicstore.codeplex.com/releases/view/59112#DownloadId=197609
To get the default page to display, you’ll want to create a controller in the Controllers folder called HomeController.
In MVC, the Urls by default are wired to the controller name (minus “controller”) and the method name. Creating an Index method is basically the equivalent of creating an index.htm page. Once this controller is created, you should be able to bring up the following urls (assuming that the ASP.NET web server is running on port 12345):
Both should display the text “Hello From Home”. Also, assume you create a controller like the one below:
This controller will display at the following Urls: