Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Create Site from Web Service

  Asked By: Jedidiah    Date: Jul 26    Category: Sharepoint    Views: 1148

Can anyone help!? I'm trying to build a simple web service to create
a new V3 site. This has been driving me nuts for weeks!

Here is my code: (assume a real domain\user)

Imports Microsoft.SharePoint
Imports Microsoft.SharePoint.Administration
Dim oWS As SPWebService = SPWebService.ContentService
Dim oWA As SPWebApplication = oWS.WebApplications("TestWebApp")
Dim oSite As SPSite = oWA.Sites.Add
("/sites/testsite", "domain\user", "user@...")

When I run this code I receive this error:

Object reference not set to an instance of an object.

Inner Exception:
...at Microsoft.SharePoint.Utilities.SPUtility.ValidateFormDigest()...

If anyone has any suggestions they would be hugely appreciated!



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Create Site from Web Service Or get search suggestion and latest updates.