We are moving a ASP.NET project from IIS6 (Win Server 2003) to IIS 8.5(Win Server 2012 R2). The project has some MVC components for which the following routing is used.
routes.MapRoute("simple", "{controller}.mvc/{action}/{id}");
routes.MapRoute(
"Default",
"{controller}.mvc/{action}/{id}"
new { controller = "Home", action = "Index", id = "" }
);
Thus call to MyDemoController
would be accessed by MyDemo.mvc
Now what happens, when I use the url as MyDemo.mvc/ it works, but when I use MyDemo.mvc without the slash it throws 404 error.
This happens only in the deployed server. In our local machines, which use IIS7.5, Win 7 it works without any issues.
Manually changing is not possible as there are lots of urls added to the sitemap file and our client does not approve the approach.
Is it something specific to the IIS version or any small tweak would solve the issue?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…