MVC with IIS 6

I have read a couple of posts on this issue but still cannot get MVC to work with IIS 6. I mapped .mvc to aspnet_isapi.dll in IIS, but I get 404 when I go through the mapped urls which looks like this

RouteTable.Routes.MapRoute("action", "api.mvc/{controller}/{action}", new {action = "Index"});

      

Then I go through //localhost/Web.Site/api.mvc/Users/List but get 404 back

the same happens for

// local/Web.Site/api.mvc/Users/

I have a UserController with a list and an index that returns a ViewAction

Is there anything else I need to do? Or am I missing something

amuses

also.............

I have to point out that my default redirect page on my website is working

for example my default code has

        HttpContext.Current.RewritePath(Request.ApplicationPath, false);
        IHttpHandler httpHandler = new MvcHttpHandler();
        httpHandler.ProcessRequest(HttpContext.Current);

      

so by default the "/" request is correctly routed through it in the global.asax.cs file

        RouteTable.Routes.MapRoute("default", "", new {controller="Home", action = "Index" });

      

not sure if this helps anyone

+1


source to share


2 answers


Try to remove the default.aspx page and make sure you have this in your web.config file:



<httpModules>
    <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing"/>
</httpModules>

      

+1


source


Did you uncheck the "Check that file exists" checkbox on the extension card?



+3


source







All Articles