Help with mvc deploy on asp site
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!
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 = "" }
);
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.
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.
精彩评论