SharePoint への接続時にエラーが発生します
接続文字列が正しいと確信しています。これが接続方法です
var connectionString = "Server=mysharepointserver.com;User=spuser;Password=******;Authentication=Ntlm;TimeOut=10;SSL=True;RecursiveMode=RecursiveAll;DefaultLimit=1000;CacheTimeout=5";
using (var connection = new SharePointConnection(connectionString)) // This is where it breaks
{
connection.Open();
using (var command = new SharePointCommand("SELECT * Tasks", connection))
{
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
Console.WriteLine(reader["Title"].ToString().PadRight(40) + " : " + reader["Country"].ToString());
}
}
}
}
connectionString を SharePointConnection にロードするときにエラーが発生する
ここに完全なエラーがあります クライアントはサーバーによって承認されていません. Connection の ConnectionString プロパティが正しいことを確認してください。
at Camelot.SharePointConnector.Data.SharePointCommand.ExecuteReader(CommandBehavior
behavior, Boolean returnScalar)
at Camelot.SharePointConnector.Data.SharePointCommand.ExecuteDbDataReader(
CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[]
datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand
command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord,
Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at Camelot.SharePointConnector.Data.Helper.ExecuteDataTable(String query, String
connectionString)
at Camelot.WebParts.BlogReader.BlogReader.Page_Load(Object sender, EventArgs e)