4

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

juan
  • 80,295
  • 52
  • 162
  • 195

2 Answers2

1

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 Nazim
  • 51,744
  • 26
  • 128
  • 170
  • Or just .aspx routes.MapRoute("Main", "{controller}/{action}.aspx", new { controller = "Home", action = "Index" }); routes.MapRoute("Default", "", new { controller = "Home", action = "Index" }); – veggerby Feb 20 '09 at 17:31
  • 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 Feb 20 '09 at 23:48
0

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: ASP.NET MVC on IIS6

Community
  • 1
  • 1
Jedi Master Spooky
  • 5,629
  • 13
  • 57
  • 86