In my previous post i talked about the SharePoint client object model
And some good topics and how to get up to speed with using it..
Today i ll write about the security in the Client object model…
I didn’t find many topics talking about it is still beta any way…
If you look in the CLR page on MSDN you will find out that it have three properties
The ClientRuntimeContext . Authentication Mode can have three values Anonymous , Forms Authentication
And default which is Windows Authentication
You can use the property FormsAuthenticationLoginInfo to set your forms authentication user name and password
Example
SP.FormsAuthenticationLoginInfo
formsLoginInfo = new SP.FormsAuthenticationLoginInfo("TobiasZimmergren", "Secret Password");
ctx.AuthenticationMode = SP.ClientAuthenticationMode.FormsAuthentication;
ctx.FormsAuthenticationLoginInfo = formsLoginInfo;
nd you can use the Credentials property for the windows
uthentication
xample
g (clientContext = new ClientContext(siteUrl))
{
NetworkCredential credential = new NetworkCredential("username", "password", "domain");
clientContext.AuthenticationMode = ClientAuthenticationMode.Default;
clientContext.Credentials = credential;
}
Remember that you can configure the authentication and security for the SharePoint application from
The central administration site
Choose application management – Manage Web Application
Select your web application and click Authentication provider
Click the default zone properties

You will find the property Client Object Model Permission Requirement you can check or uncheck it according to your scenario
Hope this topic was useful and had a good explanation … I spent some time trying to find out about that…












