NetworkCredential.Domain Property

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 11:47:18

问题


  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:


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



来源:https://stackoverflow.com/questions/17712155/networkcredential-domain-property

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!