Reputation: 1536
proxy.ClientCredentials.Windows.ClientCredential.UserName = "user";
proxy.ClientCredentials.Windows.ClientCredential.Password = "password";
proxy.ClientCredentials.Windows.ClientCredential.Domain = "my computer's name";
Hi!
How can I find out the Domain name? Is it my computer's name?
Thanks a lot!
Upvotes: 1
Views: 336
Reputation: 9469
It depends on the server, you are passing credentials to be authenticated on the server. As such, several possible cases:
Upvotes: 1
Reputation: 33910
Take a look at the DefaultNetworkCredentials property on the CredentialsCache
class. It has the Domain property you're looking for.
And no, it will not be the computer name. It will either be the name of the Windows domain the current user belongs to, or the workgroup if you're not joined to a domain.
Upvotes: 1