Alternative for AllowUnsafe updates
if (null != SPContext.Current)
{
SPUserToken adminUser = SPContext.Current.Site.SystemAccount.UserToken;
using (SPSite site = new SPSite(SPContext.Current.Site.ID, adminUser))
{
using (SPWeb web = site.OpenWeb())
{
SPUtility.ValidateFormDigest();
//Enter your code here to do Operation
}
}
}
SharePoint smoking................
Dharani
Comments
Post a Comment