NetworkCredential.Domain Property

2019-08-10 23:46发布

  MailAddress Sender = new MailAddress("SomeOne@yahoo.com", "SomeOne", Encoding.UTF8);


 SmtpClient Client = new SmtpClient("smtp.mail.yahoo.com",465);
Client.Credentials = new  System.Net.NetworkCredential(Sender.Address,"Password",Domain??? );  

just out of curiosity what is the third overload of NetworkCredential
I mean what we need to pass argument for Domain property . I searched on net but but no one used it(domain property) .I tried "Yahoo.com","@Yahoo.com","Yahoo" bot no every time same authentication error .It can be done without Domain property but where can we use it or what we can pass it .

1条回答
时光不老,我们不散
2楼-- · 2019-08-11 00:30

The Domain property is used for NTLM authentication with Active Directory domains.
It is not used for normal login scenarios.

查看更多
登录 后发表回答