Hi,
actually i need to customize public site and used custom login page for authenticated SharePoint Users.
i am follow below post :
http://community.office365.com/en-us/forums/154/p/57156/207461.aspx#207461
and checked that we can accomplish authenticated using CSOM. so i have used below code.
here is code :
string cmdSpoSite = "https://sharepoint-public.sharepoint.com/";
string cmdUserName = "username@sharepointahm.onmicrosoft.com";
string cmdPassword = "password";
helper = new MsOnlineClaimsHelper(
cmdUserName,
cmdPassword,
cmdSpoSite);
using (ClientContext ctx = new ClientContext(cmdSpoSite))
{
ctx.ExecutingWebRequest += new EventHandler<WebRequestEventArgs>(ctx_ExecutingWebRequest);
if (ctx != null)
{
ctx.Load(ctx.Web); // Query for Web
ctx.ExecuteQuery(); // Execute
lbltext.Text = ctx.Web.Title;
//Console.WriteLine(ctx.Web.Title);
}
} code is worked fine in console app. when moved on webpart of Sandbox solution it does not worked. but when i have used code on webpart in Farm Solution getting worked fine.
please guide we can used it or not?
Thanks