使用c#编写APP上传文件到sharepoint2013出错
如题,一个曾经正常使用的代码
因公司把sharepoint2003升级到了2013,这个客户端程序就无法使用了- -
提示错误"The remote server returned an error: (403) Forbidden.“
网上查询了参考资料
http://blog.symprogress.com/2013/07/upload-wsp-file-to-office365-sp2013-using-webclient/
但按照他提供的代码会提示无法调用Microsoft.SharePoint.Client.Runtime的情况
求各位大大解惑,谢谢
因公司把sharepoint2003升级到了2013,这个客户端程序就无法使用了- -
提示错误"The remote server returned an error: (403) Forbidden.“
try
{
using (WebClient IR = new WebClient())
{
IR.Credentials = new NetworkCredential("username", "pwd", "域名");
IR.UploadFile(@"http://sitename/file/filename.xml", "put", @"F:\File\filename.xml");
}
}
catch (System.Net.WebException webex)
{
MessageBox.Show("Update File Error(System.Net.WebException):" + webex.Message.ToString());
}
catch (Exception ex)
{
MessageBox.Show("Update File Error(System.Exception):" + ex.Message.ToString());
}
网上查询了参考资料
http://blog.symprogress.com/2013/07/upload-wsp-file-to-office365-sp2013-using-webclient/
但按照他提供的代码会提示无法调用Microsoft.SharePoint.Client.Runtime的情况
求各位大大解惑,谢谢
...全文
相关推荐
Microsoft SharePoint 2013 App Development
### Microsoft SharePoint 2013 App 开发#### 核心知识点概述Microsoft SharePoint 2013 是一款由微软开发的企业级协作平台,它集成了文档管理、内容管理
使用VS2013和AngularJS构建Dilbert SharePoint托管应用程序
在这个项目中,C#可能用于实现SharePoint Provider-Hosted App的后端服务,这些服务可能包括漫画数据的获取、存储以及用户评级的处理。
使用TypeScript和AngularJS的SharePoint App
开发过程中,你可能会用到C#编写后端服务,例如使用ASP.NET MVC或Web API,以提供数据接口。
SharePoint Online App开发教程
自托管App可以获取SharePoint网站的远程事件,并使用CSOM/REST和OAuth与SharePoint进行交互。
C#实现图片上传(PC端和APP)保存及 跨域上传说明
这些知识点对于实现C#图片上传功能、处理跨域上传问题以及构建高效安全的图片上传服务具有重要的参考价值。开发者在具体实现时,需要结合实际应用场景和具体需求进行代码的编写和调整。


