Get Identity when calling WCF service from Silverlight app authenticated with Forms auth -
I'm doing FormsAuthentivcation on a Silverlight app, when the SL app calls the WCF service, then I can use my WCF service Trying to get authenticated user names from within:
ServiceSecurityContext.Current.PrimaryIdentity.Name;
or (to use unsure, the problem is that both are empty)
ServiceSecurityContext.Anonymous.PrimaryIdentity.Name;
I'm configuring the WCF service with a binding like this:
& lt; BasicHttpBinding & gt; & Lt; Binding name = "mybanding" & gt; & Lt; Safety Mode = "None" & gt; & Lt; Message client CredentialType = "UserName" /> & Lt; / Safety & gt; & Lt; / Binding & gt;
The problem is that I am unable to get recognition. I'm not manually establishing certification in the client. Proxy.ClientCredentials.UserName.UserName = "slkfslkdf"; (What do I have to do?)
Thanks for any help!
this is just HttpContext.Current.User;
, there is no need to enter custom headers or ServiceSecurityContext while creating forms.
Comments
Post a Comment