嗨,我正在尝试创建web应用程序下的网站集合,该应用程序配置为基于声明的身份验证,代码如下: using(SPSite site = SPContext.Current.Site) using (SPWeb web = site.RootWeb) site.AllowUnsafeUpdatesweb.AllowUnsafeUpdates = false;
site.Al
我们有一个档案网站,这是一个确切的副本的“现场”网站,,但使用一个不同的服务帐户。我构建了一个EditControlBlock扩展,它将用户重定向到_layouts文件夹中的页面。编辑:我尝试使用的 SPWeb在另一个WebApplication中。我正在尝试将文件x移到存档站点。单击Ok按钮时,应该执行以下代码:
using (var archive = new SPSite(archiveurl, SPContext.Curren
选项1-重用现有对象 SPweb web = SPContext.Current.Web;SPList list = SPContext.Current.List; SPSite site = new SPSite(SPContext.Current.Site.ID); // dispose me
SPweb