Welcome to my personal blog, All the information in this bogs is my ideas,findings and thoughts on .Net, Asp.Net and SharePoint.
ALL POSTING ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND
This exception occurs when your try to create a WSS site from an Asp.Net application. Please make sure that the site creation code should NOT execute when Page.IsPostBack equal false. and please insert the below code snippets in the page load event. Sometimes you may required to impersonate the user.
Inserted the below code snippet in Page load event.
SPGlobalAdmin globalAdmin = new SPGlobalAdmin();
Context.Items[SPGlobalAdmin.RequestFromAdminPort] = true;
Page.RegisterHiddenField("__REQUESTDIGEST", globalAdmin.AdminFormDigest);
Anonymous comments are disabled