- Anonymous
- Default
- Forms Based Authentication
Type Of Code:
Windows Network credentials
ClientContext clientContext = new ClientContext(_siteurl);
clientContext.AuthenticationMode =ClientAuthenticationMode.Default;
clientContext.Credentials = new System.Net.NetworkCredential(“peakfinders”, “password@1”, “peakfinders”);
Web oweb = clientContext.Web;
clientContext.AuthenticationMode =ClientAuthenticationMode.Default;
clientContext.Credentials = new System.Net.NetworkCredential(“peakfinders”, “password@1”, “peakfinders”);
Web oweb = clientContext.Web;
NetworkCredential credentials = new NetworkCredential
Anonymous access Authentication
clientcontext.AuthenticationMode = SP.ClientAuthenticationMode.Anonymous;
Form Based Authentication
SP.FormsLoginInfo fbaLogin = new SP.FormsAuthenticationLoginInfo(“Suryakant”, “Hmmm”);
clientcontext.AuthenticationMode = SP.ClientAuthenticationMode.FormsAuthentication;
clientcontext.FormsAuthenticationLoginInfo = fbaLogin;
No comments:
Post a Comment