2014-03-03 68 views
0

我无法通过“Windows Phone Sharepoint应用程序”登录到SharePoint。 模拟器只是说“无效的用户名或密码,请再试一次” 我尝试了几个SharePoint网站,几个日志Ins,自动和手动填写正确的凭据,但结果相同。这里是我的代码:Windows Phone Sharepoint应用程序登录

ClientContext context = new ClientContext("https://website.sharepoint.com/"); 

    Authenticator _auth = new Authenticator(); 

    _auth.UserName = "[email protected]"; 
    _auth.Password = "password"; 
    _auth.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication; 

    _auth.CookieCachingEnabled = true; 

    context.Credentials = _auth; 

    ListItemCollection items = context.Web.Lists.GetByTitle("CALL_STATUS").GetItems(CamlQuery.CreateAllItemsQuery()); 

    context.Load(items); 
    context.ExecuteQueryAsync((object obj, ClientRequestSucceededEventArgs args) => 
    { 
     Console.WriteLine("Connected"); 
    }, 
    (object obj, ClientRequestFailedEventArgs args) => 
    { 
     Console.WriteLine("Could not connect"); 
    }); 

请帮忙。我绝望:(

回答

1

问题是与身份验证模式。 我试图用FormsAuthentication登录到Microsoft.Online。 怎么我只错过了......

相关问题