views:

494

answers:

2

I have a web hosting that replied to me it was not possible to alter the IIS6 settings to set the mapping of .mvc to the Asp.Net ISAPI dll, nor enable Wildcard Application Mappings.

In short, I cannot change any IIS setting.

Is there any way to run ASP.NET Mvc in that conditions?

Note: I read a few related questions here about this, but didn't understand them in some cases, and it wasn't what I needed in others. I'd appreciate it if before closing this one as duplicate, there was an explanation as to why, and perhaps a paraphrasing of another question.

Thanks

A: 

For what I investigated you have to ways, one is to tell IIS that all pages has to go thru ASP.NET - gif , css etc. - this way asp.net knows how to process every page. The other is to write a HttpModule, or something like this. I did the first one. I dont believe that you have any other option.

Maybe this will help: http://stackoverflow.com/questions/34194/asp-net-mvc-on-iis6

Jedi Master Spooky
But I cannot touch IIS configuration, so #1 is not an option for me
Juan Manuel
+1  A: 

if mapping to .aspx exist, try the solution found here to add a route to end up in *.mvc.aspx

routes.Add(new Route("{controller}.mvc.aspx/{action}", new MvcRouteHandler())
{
    Defaults = new RouteValueDictionary (new{ controller = "YourController"} )
});
Gulzar
Or just .aspx routes.MapRoute("Main", "{controller}/{action}.aspx", new { controller = "Home", action = "Index" });routes.MapRoute("Default", "", new { controller = "Home", action = "Index" });
veggerby
I could actually make it work with the mapping by veggerby for some reason the other one didn't work. Until veggerby comes back and posts as an answer, this will be the accepted one. Thanks all!
Juan Manuel