I'm building REST client in WCF, however can't find a way to get the current request URI from a message inspector. It is required to create a signature for custom authentication.
For the REST client, build it for IIS with ASP NET Compatibility enabled/required. You should be able to inspect HttpContext.Current in this scenario and discover the current request URI.
1
mthierba
On
You can get it from the Message.Properties.Via property (System.Uri).
0
AudioBubble
On
Hope this helps
public object BeforeSendRequest(ref Message request, IClientChannel channel)
{
var url = (request.Headers).To.OriginalString;
}
For the REST client, build it for IIS with ASP NET Compatibility enabled/required. You should be able to inspect HttpContext.Current in this scenario and discover the current request URI.