Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Getting HTTP 404 error accessing an ASP.NET MVC 1 website deployed to local machine

Posted on 2011-02-22
5
Medium Priority
?
1,987 Views
Last Modified: 2013-11-08
I've just started working with MVC, my MVC compiled error-free in Visual Studio 2008

Views folder has 2 sub-folders: Shared and User

On my local Vista PC I set up a web app in IIS 7.0, the physical path is c:\inetpub\wwwroot\MyAppName (basically I followed exactly what shall be done in IIS Manager) and I set it to be the default website (and the only website) in IIS - other attributes are Type: http; IP Address : All Unassigned, Port: 80 and Hostname left empty in the Add Web Site Dialog Box

So as I browsed to http://localhost I have gotten this error 404

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: /

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

am I missing something? I don't need to rename User to Home, do I? (I actually did this and it made no difference.)

Also, before going to IIS issue, how do I view my MVC project (login.aspx) in Visual Studio 2008? Doesn't it have a built-in webserver already? (I didn't create any Unit Test when first setting up my MVC project, so I couldn't do "Start Debugging" or "Start w/o Debugging" to view webpages, nor could I do 'View in Browser' from  the context menu because there's no such thing as I right click on all of the .aspx files in the Views/User folder (it's so different from WebForm development)

Can someone please tell me what I shall do in VS 2008 and IIS 7 to test my pages?
(I've ruled out the wildcard mapping issue that only applied to IIS 6 and below; and also have .net Framework 3.5 SP1 and ASP.net MVC install on my Vista PC)
0
Comment
Question by:MercuryKT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 9

Expert Comment

by:suvmitra
ID: 34962167
you should check again your IIS whether it is up and running properly or not. Manage the service by restarting it again and browse the default site. Default this settings are always needs to configured from client end.
0
 
LVL 10

Accepted Solution

by:
pramodsk40 earned 2000 total points
ID: 34963593
check the correct path/Routes defined in MVC global.asax...
0
 
LVL 5

Expert Comment

by:WebDOT
ID: 34965515
Check this:

In IIS Manager, click on your server name.
Open up "ISAPI and CGI Restrictions"
Make sure your version of ASP.NET is allowed.

If your version of .NET is not allowed, IIS likes to throw 404 errors (even though the page is there).
0
 
LVL 10

Assisted Solution

by:pramodsk40
pramodsk40 earned 2000 total points
ID: 34970735
0
 

Author Comment

by:MercuryKT
ID: 34994765
The reply with path/Routes defined in MVC global.asax helped. I have moved on with my current project and as I tested it on IIS I've got a differnt issue.

Please see it here
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question