views:

233

answers:

2

I have a simple ASP.NET MVC 1.0 site w/ Home, Upload, and About links based upon the default project template for an ASP.NET MVC Project. The Global.asax.cs has the following route.

  routes.MapRoute(
      "Default",                                              // Route name
      "{controller}/{action}/{id}",                           // URL with parameters
      new { controller = "Home", action = "About", id = "" }  // Parameter defaults
  );

On my local computer the site and links work correctly. However, when the site is deployed to my ISP (shared hosting) the default Home/About is displayed when the site loads, but clicking any of the links results in a 404 Page not found error.

I had to include: System.Web.Abstractions System.Web.Mvc System.Web.Routing

in my /bin folder as MVC 1.0 is not installed in the GAC on the ISP.

Thoughts on why this is not routing correctly?

Thanks, Chris

+1  A: 

There are routing issues that you need to be aware of when deploying asp.net mvc applications. What version of IIS is your ISP using?

See here:

http://stackoverflow.com/questions/34194/asp-net-mvc-on-iis6

Basically, if you're using IIS6, you'll need to hack around a bit.

Chris
Thanks. After looking around I found the info on the MVC site and was able to get it working on my hosted site. The only down side is the URLs aren't as clean since they contain ".aspx". But for now it's fine.
ChrisP
Basically you'll want to find a host that uses IIS7
Chris
Thanks. The info in the other post was helpful and I've been able to get it working.
ChrisP
A: 

I'm having the same issue. I'm running IIS 7 on .net 3.5. It is hosted on Godaddy. It worked last Thursday, 6-10-2010, but on Friday the 11th I started getting the 404 errors. Of course godaddy says they changed nothing on the servers and that they don't support 3rd party software. Nothing had changed in my code.

Paul