User agent returns null when client is using wcf test client
I want to write information about user agents to a log file. So I am using this code:
System.Web.HttpContext.Current.Request.UserAgent;
It works fine when I use the browser to consume my web service (the user agent returns the correct value), but when I use the WCF test client it returns an empty string. The IIS log user agent returns the correct value regardless of which application is using the web service. I guess I missed something, but now I don't know.
+3
user5043377
source
to share
No one has answered this question yet
Check out similar questions: