tags:

views:

57

answers:

3

Hi Guys,

i try to deploy a simple mvc2 application. but it doesnt work. my hosting provider is qualityhosting.de and they support mvc.

i see the homepage "My MVC Application - Welcome to ASP.NET MVC!" but after a click on "about" (for example) i got "The page cannot be found".

Could someone help me please?

Thank you!!

+1  A: 

This means that the URL rewriting mechanisms are not working. You should understand what does your provider require to enable them: maybe you need to go to your control panel and enable something?

Palantir
Thank you all, but no effect ;) Ive tryed to change the route. No Setting in the Administration Panel to change Url rewritting or things like that. I dont know which version of IIS my provider is running. I wrote a support request. maybe they can help me. Other ideas ?
Denis
+1  A: 

It is most likely because your hosting provider is not configured to handle extension less urls as ASP.NET pages.

For this you need to check if you can configure this with your hosting provider or as an alternative alter your routes so that you include the .aspx (which of course is configured to use ASP.NET) extension in your routes. This however makes "defaults" a little more tricky since you need to have explicit routes for all "levels", i.e.

routes.MapRoute(
    "Default",
    "{controller}/{action}/{id}",
    new { controller = "Home", action = "Index", id = "" }
);

Becomes

routes.MapRoute(
    "MainActionId",
    "{controller}/{action}/{id}.aspx",
    new { controller = "Home" }
);

routes.MapRoute(
    "MainAction",
    "{controller}/{action}.aspx",
    new { controller = "Home" }
);

routes.MapRoute(
    "Main",
    "{controller}.aspx",
    new { controller = "Home", action = "Index" }
);
veggerby
You're probably correct. There's a setting that needs to be changed in IIS 6 that makes all requests go through the IIS pipeline. I don't remember needing to change that on IIS7 though.
Cyril Gupta
Ive tryed to change the route. No effect :(
Denis
And you ARE requesting /home/about.aspx?
veggerby
A: 

yes, i tryed all that you guys saying, no effect :( my hoster doesnt answer on my support request yet (i have to move to anouther) ..

you can see my "page" on http://ha1394.domainkunden.de maybe you can help me faster by checking it ;)

i cant move to another hoster yet, but can you recommend a better one ?

thank you all, amazing community

Denis