I'm blanking and need a quick hand. Google has failed me. I'm working on replacing WCF/REST Starter Kit with ASP.NET MVC. I want to make the transition as painless as possible so I'm trying to create a route to match the following URL:
http://localhost/services/MyService.svc/UserInfo
I created the route in Global.asax.cs:
routes.MapRoute(
"MyServiceDefault",
"services/MyService.svc/{action}/{id}",
new {
controller = "MyService",
action = "UserInfo",
id = UrlParameter.Optional
}
);
I soon realized that the request isn't even making it to my application because of the .
in the MyService.svc
part of the URL.
What am I missing to force the request to pass through to my application rather than being handled by the server as a static resource?
Update
I forgot to mention that I have also tried adding the following to Web.config to no avail:
<httpRuntime relaxedUrlToFileSystemMapping="true" />
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…