Missing a trailing slash is a common error people make when browsing the web. For better usability, in 4.0, we introduced a feature called autoredirect. It is on by default, meaning, when you set up your REST service to take something like "test/", when user types in http://hostname/ServiceName/test in the browser, they will be automatically redirected to http://hostname/ServiceName/test/.
[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
{
[
}
If for some reason, you want to turn this feature off, you can register a message inspector to do that.
public
request.Properties.Remove(RedirectPropertyName);
Hope this helps!