Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 556291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:54:16+00:00 2026-05-13T11:54:16+00:00

In SharePoint 2010, there is a new method CreateWeb in the Sites web service

  • 0

In SharePoint 2010, there is a new method CreateWeb in the Sites web service with the purpose to create new SharePoint sub sites. There are, however, a lot of issues with it – well, that is my experience at least. Here is the code that should utilize the web service and its method properly:

Uri site = new Uri("http://sp2010site/"); 
string webServicePath = "_vti_bin/Sites.asmx";
string webServiceUrl = Path.Combine(site.AbsoluteUri, webServicePath);

Sites webService = new Sites();
webService.Credentials = CredentialCache.DefaultNetworkCredentials;
webService.Url = webServiceUrl;

//the following line creates the sub site
string result = webService.CreateWeb("newsite", "New Site", "Site desc", "STS#0", 
    1033, true, 1033, true, 1033, true, true, true, true, true, true, true);

The following code returns Soap exception if something wrong happened (e.g. a sub site with the address “newsite” already exists, or the specified template doesn’t exist).

If everything is ok, an InvalidOperation exception is fired with the message “There is an error in XML document (1, 310).”, but the site is actually created!

If everything is ok, but I use my own solution instead of the non-default SharePoint template (such as the Team site, i.e. STS#0), I get a Soap exception and the site does not get created.

This has been a terrible experience so far. Please post your experiences with the sub site creation in SP 2010, and even better, post your resolutions to these problems if you have any. Cheers all!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:54:16+00:00Added an answer on May 13, 2026 at 11:54 am

    Steps in SP2010 beta something to create a [sub] site from a [custom] template:

    • Activate your site template
    • Browse to betasoftwaresucks/_layouts/templatepick.aspx
    • Click on the “Custom” tab. You should be able to see your template
    • Open up a tool that can inspect the DOM (e.g. IE Developer Tools or Firebug). The DOM is modified dynamically so just viewing the HTML just won’t work unless you’re interested in one of the default templates in the default selected tab.
    • Find the value of the option element representing your template. It will look like “{guid}#templatename”. Make sure the “Custom” tab is still open or you might not be able to find this.
    • Use that value as the template parameter to CreateWeb.

    [I roll my SP SOAP “by hand” so it’s trivial to see the full request and response.]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a custom web service for Sharepoint 2010. I am
I created a new Visual Web Part in VS 2010 (using Sharepoint Server 2010),
There's this cool new feature in SP 2010 where you can specify a custom
It's my understanding SharePoint 2010 has introduced a new JavaScript API, a brand new
I have created a new Publishing Site on a newly installed SharePoint 2010 on
I wonder if there is a supported way to access the SharePoint 2010 SQL
There's a setting on the Edit View page in SharePoint 2010 that allows you
I need to create webpart in sharepoint 2010 which will allow me to view
I'm relatively new at creating custom content for Sharepoint 2010 and have been having
I am having this problem with webpart in our Sharepoint 2010 site. There are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.