HttpRoute.GetRouteData truncates the Uri in the request message to calculate the relative request Uri, but in certain cases, for example when the request Uri is equal to the virtualPathRoot, the relative Uri is the empty string, and the following call to Substring() fails because the startIndex is larger than the length of the string.
↧