Is it absolutely necessary to manually configure IIS6 to use ASP.NET MVC?

吃可爱长大的小学妹 提交于 2020-01-01 12:07:17

问题


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


回答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"} )
});



回答2:


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



来源:https://stackoverflow.com/questions/570147/is-it-absolutely-necessary-to-manually-configure-iis6-to-use-asp-net-mvc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!