简体   繁体   中英

Routing problem, handling differently online versus local - MVC.net 1.0

I have there lines in my RegisterToutes :

routes.MapRoute("Pages3", "{url1}/{url2}/{url3}", MVC.Page.RedirectTo(), new { url1 = "", url2 = "", url3 = "" });
routes.MapRoute("Pages2", "{url1}/{url2}", MVC.Page.RedirectTo(), new { url1 = "", url2 = "", url3 = "" });
routes.MapRoute("Pages1", "{url1}", MVC.Page.RedirectTo(), new { url1 = "", url2 = "", url3 = "" });

On my local machine it works great for handling the 404, but live(www.mysite.com) it just go to the IIS 404. I have a PageController witch go see if the page exist in the DB and if it don't I return to a 404 view with the status code 404 (Response.StatusCode = 404;)

How can I reproduce the same behavior live? Do I need to setup something on IIS?

I'm on winserver 2008 using c# and MVC 1.0.

Thanks for the help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM