我可以从以沙盒(部分信任)模式运行的CRM 2011插件创建sharepoint文件夹吗?

时间:2013-01-31 17:46:07

标签: sharepoint sandbox crm

我可以从以沙盒(部分信任)模式运行的CRM 2011插件创建sharepoint文件夹吗? 有些方法可以在沙箱隔离模式下运行时执行此操作,但在部分信任模式下运行时则无法执行此操作。

WebRequest request = WebRequest.Create(FolderName);
request.Credentials = credentials;
request.Method = "MKCOL";
WebResponse response = request.GetResponse();
response.Close();


SPSite site = new SPSite(url);
SPWeb web = site.OpenWeb();
SPFolder folder = web.GetFolder(url + @"/" + "Contact/");
SPFolder createdFolder = folder.SubFolders.Add(FolderName);


HttpWebRequest httpreq = (HttpWebRequest)WebRequest.Create(FolderName);
httpreq.Credentials = credentials;
httpreq.Method = "MKCOL";
WebResponse response = httpreq.GetResponse();



Dws dwsService = new Dws();
dwsService.Credentials = credentials;
string dwsurl = url + "/_vti_bin/dws.asmx";
dwsService.Url = dwsurl;
string FolderName = "Contact/" + System.Uri.EscapeDataString(listName);
 string result = dwsService.CreateFolder(FolderName);

0 个答案:

没有答案