I have a WCF REST 4.0 project based on the the WCF REST Service Template 40(CS). I\'d like to expose simple service endpoint URLs without trailing slashes. For example:
Try putting this in the Global.asax.cs
protected void Application_BeginRequest(object sender, EventArgs e) { string rawUrl = HttpContext.Current.Request.RawUrl.ToLower(); if (rawUrl.EndsWith("/cars")) { HttpContext.Current.RewritePath(rawUrl + "/"); // append trailing slash } }