none
sharepoint 2013 online clientcontent authenticaton (16 version) RRS feed

  • 问题

  • when useing  below code to login to sharepoint 2013, it come a error ""<" Is an unexpected token. Mark should be ">." Line 5, the position 5.", how to deal with it

                 var targetSite = new Uri("https://domain.sharepoint.cn");
                    SecureString passWord = new SecureString();
                    foreach (char c in @"Abcd1234".ToCharArray())
                        passWord.AppendChar(c);
                     var onlineCredentials= new SharePointOnlineCredentials("username@domain.com ", passWord);

                    using (ClientContext ctx = new ClientContext(targetSite))
                    {
                        ctx.Credentials = onlineCredentials;                    ctx.Load(ctx.Web);
                        //ctx.ExecuteQuery();
                        web = ctx.Web;
                        ctx.ExecuteQuery();
                    }

    2014年11月10日 14:07

全部回复