I'm trying to get a unique key from client such username or computer name but on wcf side none of the following works for me:
HttpContext.Current.Request.LogonUserIdentity.Name // blank
Security.Principal.WindowsIdentity.GetCurrent().Name
I'm using Anonymous mode for security and user shouldn't be logged on anyway. How can I do this ?
Thanks.
If you are using anonymous authentication mode, then a blank Name is what you get. As the mode implies, the request is kind of.... anonymous.
If a unique identifier is what you need, I think your best bet in this scenario would be to add a custom header to your request containing a Guid created at first run and preserved in isolated storage.