hi, i followed the sdk instruction in creating a site in code. i created an asp.net web app within my sps server:
http://server/_layouts/mywebapp
Then in default.aspx.cs, i have this code:
SPWeb mySite = SPControl.GetContextWeb(Context);
mySite.AllowUnsafeUpdates = true;
SPWebCollection subSites = mySite.Webs;
string currentTemplate = mySite.WebTemplate;
string siteUrl = "Klingon";
string siteTitle = "Klingon Empire";
string siteDescription = "The might Klingon Empire!";
subSites.Add(siteUrl, siteTitle, siteDescription, 1033, currentTemplate, true, false);
now, i'm getting this error:
The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
is there anyone out there who knows the fix? i've searched the internet and nothing.