The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.
System.Exception: Microsoft.SharePoint. SPException: The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again. ---> System.Runtime. InteropServices.COMException (0x8102006D): The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.
at Microsoft.SharePoint.Library. SPRequestInternalClass. DeleteSite(String bstrUrl, Boolean bDeleteADAccounts)
at Microsoft.SharePoint.Library. a.c(String A_0, Boolean A_1)
--- End of inner exception stack trace ---
at Microsoft.SharePoint.Library. a.c(String A_0, Boolean A_1)
at Microsoft.SharePoint.SPSite. Delete()
at Service.deleteSTSSite(String strSiteName)
at Service.deleteSTSSite(String strSiteName)
at Service.deleteSite(String strSiteName, String strUserName, String strPassword)
at Microsoft.SharePoint.Library.
at Microsoft.SharePoint.Library.
--- End of inner exception stack trace ---
at Microsoft.SharePoint.Library.
at Microsoft.SharePoint.SPSite.
at Service.deleteSTSSite(String strSiteName)
at Service.deleteSTSSite(String strSiteName)
at Service.deleteSite(String strSiteName, String strUserName, String strPassword)
Solution:
The SPSite.AllowUnsafeUpdate and SPWeb.AllowUnSafeUpdate properties must be set to true
site.AllowUnsafeUpdate = true
Post a Comment