Hi,
I'm trying to authenticate the user based on the credentials that I get
from the client app, but I'm getting empty string as user name. Can somebody
tell me if I'm doing anything wrong here. Thanks in advance!
Here is what I'm doing:
In the windows app, I've set the current security principal as
windowsprincipal
When I'm making to call to web service, I've tried both these things:
1)
MyService service = new MyService();
WebProxy proxy = new WebProxy(service.Url, true);
service.Proxy = proxy;
2)
MyService service = new MyService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials
In the vroot security settings for the web service, I've set the
authentication to IntegratedWindowsAuthentication
In the web.config of the web service, I've set to allow all users.
But in both cases, I'm not able to access the user name in the web service.
If I go to web service via the default UI, I'm able to access the username
fine.
Any help is greatly appreciated!