2011-02-05 53 views

回答

2

您無法檢索提供程序實例,然後執行諸如Membership.ValidateUser(username, password)之類的操作。

你需要創建一個參考the Authentication Web service,進行登錄操作(下面的C#示例 - 你必須做在Python類似的東西):

string siteUrl = "http://example.com/sites/hr"; 
AuthenticationService.Authentication client = new AuthenticationService.Authentication(); 

client.AllowAutoRedirect = true; 
client.CookieContainer = new CookieContainer(); 
client.Url = siteUrl + "_vti_bin/Authentication.asmx"; 

AuthenticationService.LoginResult loginResult = client.Login(username, password); 
if (loginResult.ErrorCode == AuthenticationService.LoginErrorCode.NoError) 
{ 
    string cookie = client.CookieContainer.GetCookieHeader(new Uri(siteUrl)); 
} 

,並使用獲得的cookie。


閱讀Reading a SharePoint list with PHP後 - 它可能給你關於從非微軟環境來訪問SharePoint的一些想法。

相關問題