.NET 웹 응용 프로그램에서 작업하고 있습니다. HTTPClient 및 Sharepoint 2013을 사용하여 "Document Library"에서 문서를 가져 오기 위해 Sharepoint Online Premise에 연결하려고합니다. REST API HTTPClient 및 Sharepoint 2013 REST API를 사용하여 문서 가져 오기
나는이의 브라우저에서 특정 웹 사이트의 문서 라이브러리에있는 모든 문서의 메타 데이터를 제공https://site_url/_vti_bin/ListData.svc/Documents
을 다음 나머지 서비스를 테스트했다. 이제
내가 서비스 URL에 대한 참조를 추가하고 다음 코드를 사용하여 프로그래밍 방식으로 동일한 작업을 수행하려고, 나는 다음과 같은 예외를 얻고있다
TestSiteDataContext ctx = new TestSiteDataContext(new Uri("https://site url/_vti_bin/ListData.svc"));
ctx.Credentials = new NetworkCredential("[email protected]", "test");
var data = ctx.Documents.ToList();
: "는 요청이 중단되었습니다 : SSL/TLS 보안 채널을 만들 수 없습니다. " 다음과 같이 스택 추적이 : 나는 어떤을 찾을 수 없습니다 this.Bust에 대한 해결책을 찾기 위해 다양한 articles/blogs 겪었
at System.Net.HttpWebRequest.GetResponse()
at System.Data.Services.Client.QueryResult.Execute()
at System.Data.Services.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
at System.Data.Services.Client.DataServiceQuery`1.Execute()
at System.Data.Services.Client.DataServiceQuery`1.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at SPO_AccessAWebService.Program.Main(String[] args) in Location\Program.cs:line 35
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
. I 다양한 샘플 그쪽 프로그램이 또한 동일한 오류 던지고
ctx.Credentials = CredentialCache.DefaultNetworkCredentials;
의 인증 수단에 의해 알 수 있었다.
SharePoint 2013 REST API를 인증하는 다른 방법이 있습니까?
이 문제를 해결하기 위해 누군가 나에게 통찰력을 제공 할 수 있습니까?