Home » Sharepoint 2010

How to import site template programmatically

I have customized a subsite and exported as .wsp file. How can I programmatically import this file and use as site template to create a same subsite in another sharePoint server.

I need code to import and use the template file (.wsp) programatically.



7 Answers Found


Answer 1

Hope you find answer in this post, read each reply carefully.

Creating a dynamic site using custom template programmatically


Answer 2


Thanks for sharing the link, i followed your instructions and after some reading i am lost. As there are lots of other links/questions and replies in that link which is not exactly covering my question to the point which makes it confusing for me. As i am not much experienced i would like you to write the only code that is answer to my question. I will be thankful to you.

1- How to import a .wsp (site template) file programmatically on a fresh SharePoint (import and activate). This should be done by a proper check if the same is not already installed only then, otherwise skip to next point below

2- Ceate a new sub-site based on custom site template that is uploaded and activated in step No. 1

3- How can I list all existing site templates which are shown while we create a new site? I have to give an option to choose site templete which are already setup on sharepoint server.


Answer 3

Hi all,

To my last question for listing all existing web templates I used following code for testing:

staticvoid Main(string[] args)
      string webTemps = "";
      string cusTemps = "";
      using (SPSite site = new SPSite("http://sp2010dev.mydomain.us"))
        using (SPWeb web = site.OpenWeb())

          foreach (SPLanguage lang in web.RegionalSettings.InstalledLanguages)
            foreach (SPWebTemplate template in site.GetWebTemplates((uint)lang.LCID))
              webTemps += template.Name + " = " + template.Title + " (" + lang.LCID + ")\r\n";
            foreach (SPWebTemplate template in site.GetCustomWebTemplates((uint)lang.LCID))
              cusTemps += template.Name + " = " + template.Title + " (Custom)(" + lang.LCID + ")\r\n";
      Console.WriteLine (webTemps);

but the problem is, its showing all as Standard web templates even i had imported and activated my own few templates manullay to test the code which should be in list of cusTemp but they are all in webTemp. Just to understand then what does mean of customWebTemplates.

also the list is something odd. its showing LCID with my customer web templates. How can i list/filter only those web templates which are avaiable through UI at the time of choosing a template when creating a subsite etc.

GLOBAL#0 = Global template (1033)
STS#0 = Team Site (1033)
STS#1 = Blank Site (1033)
STS#2 = Document Workspace (1033)
MPS#0 = Basic Meeting Workspace (1033)
MPS#1 = Blank Meeting Workspace (1033)
MPS#2 = Decision Meeting Workspace (1033)
MPS#3 = Social Meeting Workspace (1033)
MPS#4 = Multipage Meeting Workspace (1033)
CENTRALADMIN#0 = Central Admin Site (1033)
WIKI#0 = Wiki Site (1033)
BLOG#0 = Blog (1033)
SGS#0 = Group Work Site (1033)
TENANTADMIN#0 = Tenant Admin Site (1033)
ACCSRV#0 = Access Services Site (1033)
ACCSRV#1 = Assets Web Database (1033)
ACCSRV#3 = Charitable Contributions Web Database (1033)
ACCSRV#4 = Contacts Web Database (1033)
ACCSRV#6 = Issues Web Database (1033)
ACCSRV#5 = Projects Web Database (1033)
BDR#0 = Document Center (1033)
OFFILE#0 = (obsolete) Records Center (1033)
OFFILE#1 = Records Center (1033)
OSRV#0 = Shared Services Administration Site (1033)
PPSMASite#0 = PerformancePoint (1033)
BICenterSite#0 = Business Intelligence Center (1033)
SPS#0 = SharePoint Portal Server Site (1033)
SPSPERS#0 = SharePoint Portal Server Personal Space (1033)
SPSMSITE#0 = Personalization Site (1033)
SPSTOC#0 = Contents area Template (1033)
SPSTOPIC#0 = Topic area template (1033)
SPSNEWS#0 = News Site (1033)
CMSPUBLISHING#0 = Publishing Site (1033)
BLANKINTERNET#0 = Publishing Site (1033)
BLANKINTERNET#1 = Press Releases Site (1033)
BLANKINTERNET#2 = Publishing Site with Workflow (1033)
SPSNHOME#0 = News Site (1033)
SPSSITES#0 = Site Directory (1033)
SPSCOMMU#0 = Community area template (1033)
SPSREPORTCENTER#0 = Report Center (1033)
SPSPORTAL#0 = Collaboration Portal (1033)
SRCHCEN#0 = Enterprise Search Center (1033)
PROFILES#0 = Profiles (1033)
BLANKINTERNETCONTAINER#0 = Publishing Portal (1033)
SPSMSITEHOST#0 = My Site Host (1033)
ENTERWIKI#0 = Enterprise Wiki (1033)
SRCHCENTERLITE#0 = Basic Search Center (1033)
SRCHCENTERLITE#1 = Basic Search Center (1033)
SRCHCENTERFAST#0 = FAST Search Center (1033)
visprus#0 = Visio Process Repository (1033)
<span style="text-decoration:underline"><strong>{0F0ACE45-1E7C-44F7-BE70-0DC5C976E8C4}#MyTestSiteTemplate = MyTestSite</strong></span>
<strong><span style="text-decoration:underline">Template (1033)
{65BD8110-DE95-450E-9076-89FBC2157DE3}#MySiteTemplate = MySiteTemplate
{FDB996BF-9038-403A-9AD9-F851C8C976BA}#MyProdSiteTemplate = MyProdSite
Template (1033)


The last three bold and underlined templates are those which I uploaded and activated manually. Should not these be found in CustomeTeplates' list?

Please help me with all me three questions earlier.



Answer 4

Hi Shamshad,


Thanks for your post.

I don’t think it’s a good idea to achieve this using .wsp Site template. you can create a site definition to achieve.

More information about “Create Site Definitions for SharePoint 2010”.



Answer 5

Hi Wayne,

I watched the video. But still I am looking for upload method code to add solution (MyTemplate.wsp) file and activate it programmatically like we do this from UI (i.e. Site Settings > Galleries > Solutions > upload solution and activate solution). The reason is I have to create different templates based on client's requirement (ie. color theme and other navigation links etc.) by time to time and I want those should be setup in users sharePoint server automatically. I am working on making a setup installer which will show a dropdown based on an .xml/config file for available templates in a particular folder and let user choose any template among a list of available templates. Then watever the user choose template we create a subsite based on that template. It will save alot of time and in future if we modify existing template based on client requirement we will name it a new template and copy in setup folder and update new template information in xml/config file. When user run setup it will show new template available for users when selected new template will be upload on users sharePoint servers by simply running the installer setup and hence the installer will add/upload new template and based on it users will be able to avail the new template style without any problem.

I tried following code to upload templates in All sites> Gallaries > solutions but it was uploaded in "_catalogs/lt/Forms/AllItems.aspx" (all sites> Gallaries > List templates). But not in "_catalogs/solutions/Forms/AllItems.aspx" for this reason the new template is not available in UI as well. Please guide me how do i do this programmatically.

staticvoid Main(string[] args)
        using (SPSite site = new SPSite("http://sp2010.mydomain.us"))
          site.AllowUnsafeUpdates = true;
          using (SPWeb web = site.OpenWeb())
            // SPDocumentLibrary list = (SPDocumentLibrary)web.Lists["Soutions Gallery"];
            SPDocumentLibrary list = (SPDocumentLibrary)web.Lists["List Template Gallery"];
            SPFolder myFolder = list.RootFolder;
            // ---
            ExeConfigurationFileMap map = new ExeConfigurationFileMap();
            map.ExeConfigFilename = (@"C:\SPPackageWork\MyTemplates.config");
            Configuration config = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None);
            KeyValueConfigurationCollection siteTemplates = config.AppSettings.Settings; 
            // ---//Configuration config = (Configuration)WebConfigurationManager.OpenWebConfiguration("/appSettings"); //as System.Configuration.Configuration;//KeyValueConfigurationCollection siteTemplates = config.AppSettings.Get; // GetSiteTemplates("siteTemplatesSection");//NameValueCollection siteTemplates = ConfigurationManager.AppSettings;string[] templates = siteTemplates.AllKeys;
            //string[] templates = siteTemplates.AllKeys;foreach (string template in templates)
              string siteTemplate = siteTemplates[template].Value;
              byte[] data = File.ReadAllBytes(siteTemplate);
              Hashtable metaData = new Hashtable();
              metaData.Add ("Language", "1033");
              metaData.Add("Title", template);
              web.ParserEnabled = true;
              SPFile file = myFolder.Files.Add(siteTemplates[template].Key, data, metaData, true);
              web.ParserEnabled = false;

Answer 6

Hello everyone,

By replacing the List Name from above code with following, I am able to upload my all .wsp solutions in Solution's Gallery from given folder.

SPDocumentLibrary list = (SPDocumentLibrary)web.Lists["Solution Gallery"];

 but all those solutions which I had uploaded programmatically are not activate, I am able to view them from UI but the activate/deactivate buttons are disable for these programmatically uploaded solutions. Where I am doing mistake. Please help.



Answer 7

Hello again,

I come up with some test that if now i upload a .wsp file manually it also won't let me activate/deactivate the newly uploaded file. The reason might be I am just copying an existing solution.wsp file and replacing with solution1.wsp which might be read internally by sharePoint and match its LCID with existing uploaded one and hence it won't let you activate it anymore. Is that correct?

Further I tried by removing exiting original uploaded template using UI and then uploaded programmatically using above code. The activagte option was not available from UI for the same solution file, then I tried the same solution uploading by UI, it gave me activate option. so I finally concluded that the given code above has some bug or i am doing wrong way to upload the solution. Also I don't know how can I activate solution  programmatically. Please help !!!

My question is now close to following post:


The guy is able to activate but its not availabe until it has been manually deactivated and activated back using UI. What is the issue with code then?

from this link above I tried to activate the solution but getting error "Value cannot be null. Parameter name: g". I don't understand where i am doing wrong in this code?

SPUserSolution userSolution = site.Solutions.Add(file.Item.ID)
I also tried this way http://blogs.msdn.com/b/manuj/archive/2010/06/09/manipulating-sharepoint-2010-user-solutions-programmatically.aspx no luck ....



I am trying to create a subsite (programmatically) in my sharepoint site from a custom template that is in my solutions gallery. All this should happen inside a visual web part when a user enters a string and clicks on add. I have made the structure of the web part with all the buttons and labels, however I am not able to find the right kind of resources for creating a site from a custom template. Can anyone please point me in the right direction?

Thanks for your time

Sajat Jain



I have sites like




I have created Project1 as Template (Save as Template) and this template is available at http://kashyap Site Gallery > Solutions

http://kashyap/Team has a list called projects. I want to do custom workflow which is run by user manually(It is not problem). I want to create site programmatically  based on the template. I did some code Its

privatevoid codeCreateSite_ExecuteCode(object sender, EventArgs e)
      SPWeb web = workflowProperties.Web;

      SPListItem lst = workflowProperties.Item;
      string title = lst["Project Title"].ToString();
      string url = Common.UrlString(title);
      string desc = "Project from " + Common.GetFormatedValue(Convert.ToString(lst["Customer"]), Common.FormatedValueType.Name);
      if (!web.Webs[url].Exists)
        SPWebTemplateCollection templates = workflowProperties.Site.RootWeb.GetAvailableWebTemplates(1033);
        SPWebTemplate prjTemp = null;
        foreach (SPWebTemplate tp in templates)
          if (tp.Title == "project")
            prjTemp = tp;

        if (prjTemp != null)
          SPWeb wb = web.Webs.Add(url, title, desc, 1033, prjTemp, false, false);
          lst["Site Url"] = wb.Url;
          lst["Site Name"] = url;

and I want some workflow in the that template site. which is dynamically generated. so which type of workflow I need to create? reusable, site ,list. I am totally confused. and code also given me error about feature not availlabe.

Any budy have solution?





I have been googling this alot but can't find an answer but it must not be very difficult to accomplish.

To get the standard templates I do:

 server = serverURL();
 (SPSite siteCollection = new
    //SPWebTemplateCollection Templates = SPContext.Current.Site.GetCustomWebTemplates(1033);

    SPWebTemplateCollection Templates = siteCollection.GetWebTemplates(1033);
 (SPWebTemplate template in
 ListItem(template.Title, template.Name));

and it works just fine but when I try to get the custom templates (which are activated in the solution gallery) with:
 server = serverURL();
 (SPSite siteCollection = new
    SPWebTemplateCollection Templates = SPContext.Current.Site.GetCustomWebTemplates(1033);
    //SPWebTemplateCollection Templates = siteCollection.GetWebTemplates(1033);
// also tried with
// SPWebTemplateCollection Templates = siteCollection.GetCustomWebTemplates(1033);
foreach (SPWebTemplate template in Templates) { ddlSiteTemplate.Items.Add(new ListItem(template.Title, template.Name)); } } }

the dropdown is empty, what am I doing wrong?



We have created a sub-site in our devlopment enviornment, we have used sharepoint designer to create this subsite. We need to move this sub-site under a site collection to our production enviornment farm. So we can either use stsdam export/import or save the sub-site as site template(include contents) and create sub-site in production enviornment using that site template. I wanted to know whats the difference between above two methods, or both does the same things.

NOTE: As only one sub-site will be created using this site template, so we thought we will not be creating a site defination for this.

Thanks in advance,

I am trying to create a site template base on an existing site and try to use the new site template to generate other sub-sites.  It sounds simple and the code is not that difficult to follow; however, Microsoft has made it impossible to accomplish by having a bug in their template creation process.


//Generate web template from existing website

using (SPSite site = newSPSite("http://localhost"))


SPWeb web = site.OpenWeb("/barrington/accounting");

web.SaveAsTemplate("NewDepartmentTemplate", "NewDepartmentTemplate", "NewDepartmentTemplate", true);



//Generate sub site using the new template

using (SPSite site = newSPSite("http://localhost"))


SPWeb web = site.OpenWeb("/barrington/accounting");

SPWebTemplate tp = null;

foreach (SPWebTemplate wt in web.GetAvailableWebTemplates((uint)1033))


if (wt.Title == "NewDepartmentTemplate")


tp = wt;




if (tp != null)


SPWeb newWeb = web.Webs.Add("NewDepartment", "NewDepartment", "NewDepartment", (uint)1033, tp, false, false);




Microsoft.SharePoint.SPException was unhandled
  Message=The content type name '$Resources:_FeatureId367b94a9-4a15-42ba-b4a2-32420363e018,DataSourceContentTypeName;' cannot contain: \  / : * ? " # % < > { } | ~ & , two consecutive periods (..), or special characters such as a tab.
  NativeErrorMessage=FAILED hr detected (hr = 0x8107058a)

       at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
       at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)
       at Microsoft.SharePoint.SPWeb.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere)
       at ApplicationMaintainence.frmSharePointMaintenance.bttnProcess_Click(Object sender, EventArgs e) in C:\VS\SVN\EO\ApplicationMaintainence\frmSharePointMaintenance.cs:line 117
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at ApplicationMaintainence.Program.Main() in C:\VS\SVN\EO\ApplicationMaintainence\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Runtime.InteropServices.COMException
       Message=<nativehr>0x8107058a</nativehr><nativestack></nativestack>The content type name '$Resources:_FeatureId367b94a9-4a15-42ba-b4a2-32420363e018,DataSourceContentTypeName;' cannot contain: \  / : * ? " # % < > { } | ~ & , two consecutive periods (..), or special characters such as a tab.
            at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)
            at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)


Hi ,

Since Fab 40 templates have not been upgraded to SP2010. We created sites from Application templates (2007).

After upgrade to SP2010 ,we saved the site created from KnowledgeBase as site template.

We are getting an error when we try to create a site from KnowledgeBase Site template saved in Solutions.

Error loading and running event receiver Microsoft.SharePoint.ApplicationTemplates.KnowledgeBaseEventHandler in KnowledgeBaseEventHandler, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Additional information is below.

Unable to load assembly group. The user assembly group provider was unable to provide any user assemblies for the specified assembly group.

Could anyone please suggest a solution or it is best to download the site templates from TechSolution site.






I am using SharePoint (Version: 12.0.6318.5000). The scenario is like that;

I have created a Site Collection and under that I have 2 sub sites and under each sub sites again I have a sub site (Site Collection [level 1]>>>SubSite+Lists [level 2]>>>SubSite+ Lists [level 3]>>>Lists, Doc. Library and Picture Library). I have modified a master page and given different name and used as custom and default master page throughout site collection. My master page is having some custom CSS and Image links (used $SPurl so that it should appear in all the sub sites). I have created Some Custom Pages using SharePoint Designer and saved at the same level of home page(default.aspx) of site collection and sub sites alsoNow I have used Solution generator to generate WSP (with the help of WSP Builder from Codeplex site) and created custom 3 different site definitions for each level. Our need was that, If we need to create any level we can easily create new sub site and all the custom pages, library will be available automatically

This WSP has been verified and accepted by our client and they have deployed in test environment. Due to some reason they used it as the live site and now they have lots of data in it.

Now my problem is if we take backup and restore it to the some other location using stsadm admin tool, all the navigations are showing 404 file not found error exceptsetting pages(_layouts/pagesnames.aspx).

Is any possible way of resolving this issue or any other alternatives of restoring data to other server with Custom Site Definition.

Thanks in Advanced



Using the GUI to create a subsite you can configure ‘Display this site on the top link bar of the parent site’.

How to do the same thing programmatically?

PS. Can anyone confirm that the default behavior regarding this has changed from MOSS 2007 (true) to SP 2010 (false)?


I have created a page that I want to use as a template for future sites which shall have a familiar look.
I have saved it succesfully without encountering any obstacles, but when I then create a new site using the new template and goes to Site Settings, the globalnavigation items disappears and it exposes the entire CSS file instead of the globalnavigation items.

I have tried with several templates. I have de- and reactivated the Publishing Site feature and that didn't help either. I opened the .wsp files to see if any sitescopes was of the wrong entity. I have also googled the issue and found many solution proposals and tried them off but they didn't get the job done for me.

Do any of you know a solution to this problem?


Ok, I just treid to do something that I didn't really think would work, but now that I've seen it fail, I get to ask the question. Is there a best practice on converting site templates built for MOSS 2007 to SharePoint 2010. We have several projects that used the Visual Studio Extensions (v1.3) and the SharePoint Solution Generator to build custom site templates and the .wsp packages. I can add and deploy the solution packages using the STSADM tool, but when I try to create a sub-site based on that template, I get an Object Not Set to an Oject Reference Error. In case anyone is wondering, it works fine in MOSS 2007. I have not tried Visual Studio 2010 yet (it's downloading in the background). I'm just wondering if anyone has run into this and what they did to fix it.



I accidentally created a site on a path where I needed to create a site collection. After deleting the site and creating the site collection in its place, I arrived at the Template Selection page. I went to Solution Gallery, uploaded my solution (a package made by the consultants who built our SharePoint site) and activated it. When I activated it I got an error message, but the solution shows in the Gallery as active. I went back to Template Selection to select a template from the solution, but none are showing--just the standard templates. How do I fix this?

A site template was deleted from the solutions gallery and deleted out of the recycling bin before it was deactivated.

How can I deactivate it now so that it doesn't show up as a template to choose when creating a new site?


It is possible. Follow the steps:

1.Create site/Site collection template

2.From STSADM - Add the solution and Deploy the solution.(Deploy at Farm Level)

3.Go to the ~/14/TEMPLATE\FEATURES . In feature folder there are four folders with the name given to the custom template.In the last folder find the features.xml and Onet.xml

4.Change the scope from 'site' to 'Farm' n feature.xml.

5.Reset IIS.Feature in now available in the central admininstration's farm features with the name same as given at the time of template creation.Activate the feature.

It is now available under Site Collection's custom tab.




Please provide me information for how  to fix this problem.

When to occur this problem in share point.

When  i create save as list template and save as site templates its showing the following error below:
Unknown compression type in a cabinet folder   at Microsoft.SharePoint.Library.SPRequestInternalClass.SaveWebAsTemplate(String bstrUrl, String bstrTemplateName, String bstrTemplateTitle, String bstrDescription, Boolean bSaveData)
   at Microsoft.SharePoint.Library.SPRequest.SaveWebAsTemplate(String bstrUrl, String bstrTemplateName, String bstrTemplateTitle, String bstrDescription, Boolean bSaveData)



We ran through a database attach upgrade with SharePoint 2010 from a 2007 instance that had the 40 application templates installed.  The pre-upgrade check ran fine and gave us NO errors.  

During testing of the migration, all features were tested: Infopath forms, saving sites as templates (which we've run into issues with in the past).

Fast forward two weeks.

I'm trying to modify a site template.  I attempt to save an existing site as a template, to no avail.  Great.  Error message: "Error exporting the site field named "Asset"."  Great.  Do some googling and some forum work to discover a possible fix:

"Deactivate your tsatypes solution and reactivate it" (tsatypes being the solution that contains the 40 Application Templates fields)  Run the deactivate command: successful.  Reactivate command: "The field with id {e9d56b99-1eac-4f1d-a578-c55fe7b8603a} defined in feature {75a0fea7-cd50-401e-af0e-782f3662a2999} was found in the current site collection or in a subsite."

Uh, okay. 

So, trying the save as template again, the error message has changed.  Well, I guess that's progress.  Now it reads: "Error exporting the site field named "Asset"."  Sure.  

Does anyone have any thoughts on where I should go from here?



Working with a client migrating content from a SharePoint 2007 site to SharePoint 2010.  They wanted to bring up a brand new farm and then migrate the content from their old system.  Once we stood up the new farm we did a backup on the 2007 content to upgrade it to SP 2010 on a separate web Application.  We then used the export-SP to export the site from the old site and the import-spweb to import the site to the new SP 2010 site.  This all worked great.  However, when we did the visual upgrade after the import the Custom Master does not seem to be working, specifically the site logo.  When applying the custom master page the site logo shows the red X as it cannot find the logo.  When you check the properties to see what the reference url is it shows http://servername/_catalogs/masterpages.   I took the exact same export file and imported into my test machine and it does not have this same behavior.  It picks up the reference just from the Master Page.   The site logo is specified in the Master Page.  Anyone have any ideas?


Hi All,

According to the technet documentation there is a SharePoint template site called Microsoft Project Site.


It doesn't appear to be available from the site actions -> more options or from the site actions -> new site menu paths.

can anyone advise me as to why this option appears not to be available ?

thanks and regards,





We are running SharePoint Server with Enterprise Client Access License.



Can someone advise on how to troubleshoot or correct this error:

"The site template requires that the Feature {a392da98-270b-4e85-9769-04c0fde267aa} be activated in the site collection."

Here are the steps I took:

I took a simple site from one SP2010 and saved that site as a template Copied the resulting WSP file to a different SharePoint 2010 server From the 2nd SP2010 server, I went to the Solution Gallery and uploaded my WSP file, then immediately Activated the solution. Under Site Collection Features, I found a feature called: "Web Template feature of exported web template <my template name>" and I verified that the feature was Active. Went to create a new site (Site Actions>New Site) From the "Custom" tab selected my custom template Gave my new site a title and a URL name, then clicked Create.

Instead of creating my site I got this error.  Thoughts? 

Also, how can I look up which feature featureID "{a392da98-270b-4e85-9769-04c0fde267aa}" is referring to?  Is that related to my Site Template or some other feature that my custom site template needs?

Tom Castiglia Hershey Technologies


I am using SharePoint 2007.

I created a blank site. I have a site template available in the Application. I want to restore the site template to the newly created site.

How to restore the site template for the newly created site?

I am not sure of the term used.. Is it restore or import.


Thank you


hi everyone

I has create a custom site template by click on site setting --> Save site as template on sharepoint 2010
After that i try to create a sub-site by using the following code

newWeb = parentWeb.Webs.Add(strURL, siteTitle, siteDes, lcid, siteTemp, false, false);
newWeb.Navigation.UseShared = sharedNav;

When i run my script it show the following error
File or arguments not valid for site template '#sp_dev_01'. Parameter name: WebTemplate

So I tried several ways to check what caused this issue
1. Create a script to show all template. And it was there.
2. Create a site manully by using click on new sites and select the custom site template. I was success

And i had try the same code on sharepoint 2007 it was working fine.
Does anyone can let me know how to fix it .




<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure