Request.GetConfiguration().GetODataPathHandler() is returning null. This is probably because we are not calling SetODataPathHandler when creating the default path handler.
Scenario: Link generation like below..
response.Headers.Location = new Uri(Url.ODataLink(Request.GetConfiguration().GetODataPathHandler(),
new EntitySetPathSegment("Products"), new KeyValuePathSegment(addedProduct.ID.ToString())));
Comments: Verified
Scenario: Link generation like below..
response.Headers.Location = new Uri(Url.ODataLink(Request.GetConfiguration().GetODataPathHandler(),
new EntitySetPathSegment("Products"), new KeyValuePathSegment(addedProduct.ID.ToString())));
Comments: Verified