我正在尝试使用SharePoint文档库中的文件HttpWebRequest
.为了做到这一点,我必须传递一些凭据.我正在使用以下请求:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
request.ContentType = "application/msexcel";
request.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
request.Credentials = new NetworkCredential(UserName, PassWord);
Run Code Online (Sandbox Code Playgroud)
这是传递凭据的正确方法吗?
我正在使用SharePoint 2010.我在该库中有一个文档库ID和文档ID.我没有web文件库所在的站点.现在我必须得到文档的完整URL在运行时.我怎么能得到它.我尝试了以下内容.
string filepath = currentList.DefaultViewUrl + "/" + sListItem.Url;
Run Code Online (Sandbox Code Playgroud)
请回答这个问题.
在我目前的项目中,我必须将一些文件格式转换为PDF.源文件格式可以是MSOffice(.doc,.docx,.xls,.xlsx,.ppt,.pptx)和图像(.jpg,.png,. jpeg,.tiff).我们希望不使用任何第三方库.代码应该在c#中.请提供链接.谢谢你的提前?