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.
Asked
Active
Viewed 1,399 times
3 Answers
0
You can get it from the Message.Properties.Via
property (System.Uri
).

mthierba
- 5,587
- 1
- 27
- 29
-
1That value is "null" – StingyJack Apr 02 '17 at 00:44
-1
Hope this helps
public object BeforeSendRequest(ref Message request, IClientChannel channel)
{
var url = (request.Headers).To.OriginalString;
}
-1
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.

Scott Seely
- 757
- 4
- 6