views:

41

answers:

3

Hello, i have this problem... i have an ASP.NET MVC application locally and i have in one server another application in asp, i need to add the mvc application to the asp application. So i have "http://www.aspApp.com/mvcApp" but i cant work with the mvc application, when i call for example /Controller.aspx/Action, it throws a 404 error, and the address that i see in firebug for the get is "http://www.aspApp.com/Controller.aspx/Action", but this should be "http://www.aspApp.com/mvcApp/Controller.aspx/Action" i think... i try to change the post and get's in the mvc application to /mvcApp/Controller.aspx/Action instead /Controller.aspx/Action but it doesn't work at all, if in the explorer i put "http://www.aspApp.com/mvcApp/Controller.aspx/Action" it throws the 404 to. The IIS is 6.0 and i think i have the correct configuration for mvc.

I hope you can helpme, thanks!

A: 

Setup your routes like this,

 // Classic URL mapping for IIS 6.0
        routes.MapRoute(
            "Default",
            "{controller}.aspx/{action}/{id}",
            new { action = "Index", id = "" }
        );

        routes.MapRoute(
            "Root",
            "",
            new { controller = "Home", action = "Index", id = "" }
        );
John
I have the global.asax like you put, but it doesn't work to. The problem i think is some configuration on IIS6 to tell the mvcApp that is inside the asp web. But i dont know for sure.
Gonzalo Calandria
A: 

You need to put the web.config inside your "mvcApp" virtual directory - so the mvc app will know the application root is at that directory instead of at the website root.

Johannes Setiabudi
A: 

I fix it! The problem was on the iis configuration, the check "Verify that file exist" was checked and i uncheck and fix the problem.

Gonzalo Calandria