R
richard.martino
I have a desktop application in which I need to get the
System.Net.ICredential of the currently logged in user.
I do not care what the domain, username or password is. I just need
the credential in order to send an email via our in-house email
system.
I can easily get domain and username, but I do not want to prompt the
user for his password because he already logged in and he already
authorized to send an email.
BTW, System.Net.CredentialCache.DefaultCredentials
and ...DefaultNetworkCredentials do not work.
I think there might be a way to create this System.Net.ICredential
somehow from System.Security.Principal.WindowsIdentity.GetCurrent(),
but I have not, yet, found it.
Thanks.
System.Net.ICredential of the currently logged in user.
I do not care what the domain, username or password is. I just need
the credential in order to send an email via our in-house email
system.
I can easily get domain and username, but I do not want to prompt the
user for his password because he already logged in and he already
authorized to send an email.
BTW, System.Net.CredentialCache.DefaultCredentials
and ...DefaultNetworkCredentials do not work.
I think there might be a way to create this System.Net.ICredential
somehow from System.Security.Principal.WindowsIdentity.GetCurrent(),
but I have not, yet, found it.
Thanks.