views:

648

answers:

2

I am trying to deploy my MVC app on a subdomain, unfortunately I get 404 errors.

I tried to find out if it's MVC itself that can't handle being hosted on a subdomain.

I uploaded the standard bare MVC webapp that you get when you start a new project. The index page loads, but all the other pages that require actual routing based on the url do all give 404's.

What do I need to change to be able to use MVC on a subdomain.

(it's all setup on a IIS 7.5 server as a seperate website)

+1  A: 

Is this a shared host where the subdomain is resolved via URL rewriting to point to a sub folder?

MVC doesn't care what the domain name is. I've used it with a couple different subdomains, but they were not on the type of host that would be rewritting to a sub folder.

Dennis Palmer
It doesn't look like it. Is is indeed a shared host, but the subdomain points to a seperate wwwwroot folder, not a subfolder of my main domain wwwroot.
Strange that the index works then. Sounds like @danswain's answer was what you needed.
Dennis Palmer
+2  A: 

I had this problem with a shared hosting provider. I had to get them to change the Application Pool to "Integrated Mode" instead of "Classic" mode in iis7 for it to work. Not sure why, haven't really looked into IIS7 that much

danswain
It was indeed the problem that I didn't set it to "2.0 integrated mode". It was on "2.0".