简体   繁体   English

在从c#开始下载之前检查文档是否存在于SharePoint中

[英]check whether the document present or not in SharePoint before starting download from c#

I have a uri which has the document details. 我有一个具有文档详细信息的uri。 this uri I am getting it from share point . 这个uri我从分享点得到它。 But in some cases if the document is not present document downloading code is giving timeout exception. 但在某些情况下,如果文档不存在,文档下载代码会给出超时异常。 how can I check whether the document present or not in SharePoint before starting download from c# 在从c#开始下载之前,如何检查SharePoint中是否存在文档?

Do a HEAD request to the URL to check for the resource. 对URL执行HEAD请求以检查资源。 Example here , you will need to port it to C# 这里的示例 ,您需要将其移植到C#

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM