Passing password in encrypted for to SharePoint CSOM model -


using (clientcontext context = new clientcontext("http://yourserver/")) { context.credentials = new networkcredential("user", "password", "domain"); }

i wand send password in encrypted form possible , how?

yes, possible can refer following code:

var siteurl1 = "http://yourwebsite" var spusername1 = "domainname\username"; var password = "pass"; var securepassword = new securestring(); foreach (char c in password) {    securepassword.appendchar(c); } clientcontext context = new clientcontext(siteurl1); var credentials = new networkcredential(spusername1, password); context.credentials = credentials; 

Comments