views:

55

answers:

2

I have deployed my ASP.net MVC site to a shared hosting company. The problem is that now none of the pages except for the home page work. For example if I go to /Account/Register I get a page not found. However, if I go to /Account/Register/Index.aspx then it does work. I have tried modifying the routing to add in that index.aspx but everything I have tried fails.

A: 

Sounds like you need to either

1) have a wildcard mapping set up in IIS (don't know if thats an option)

2) or setup the routes to include the extension ("{controller}.mvc/{action}/{id}").

Either way have a look at this post by Phil Haack: ASP.NET MVC on IIS 6 Walkthrough

Luhmann
Looks like option 1 was correct. However, I don't have access to IIS but a friendly email had the right people do it for me =D
Ready Cent
Great. Glad it helped. If it worked out for you, then you should accept the answer and upvote if you think it deserves it - this way you make me happy, and the next guy who has your question will know that it helped you. Thanks.
Luhmann
@ready, glad it's fixed, but you should understand that enabling wildcard mapping has a significant performance impact on requests for static content such as images/scripts/css. In general option 2 is the better approach, perhaps with url rewriting if you really concerned with the appearance of the URL.
Paul Creasey
@Paul. Thats right, at least when there is limited acces to IIS. But you can put static content on another domain (subdomain) without wildcardmapping or you can exclude the static file folders from wildcard mapping (http://blog.stevensanderson.com/2008/07/07/overriding-iis6-wildcard-maps-on-individual-directories/)
Luhmann
@Luhmann, very good link, i haven't seen that before and plan to try it out, solves most of the problem!
Paul Creasey
A: 

Here use this tool, it will help you figure out what is going on: link text

Al Katawazi