.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Activate Features on Site Collection creation via Site Template

Posted By:      Posted Date: October 06, 2010    Points: 0   Category :SharePoint

I'm attempting to make my first Site Template, and I'm using some of the existing OOB template onet.xml files as a guide.  One thing I can't figure out is how to select which Features you want to be activated on the site collection creation from your template.

Also, how can you find a list of all available Features and the Scopes the are available for?

View Complete Post

More Related Resource Links

Programmatically activate SharePoint Server Enterprise Site Collection features


As my solution requires the enterprise features I'm required to activate them. Right now I'm doing it manually through "site settings -> site collection features", but I want to do it automatically when activating an other part of my solution. I've used PowerShell to see the difference for "Get-SPFeature -site myurl" before and after activating the enterprise feature by hand, but there're at least 10 site collection features being activated through this one click step.

Is there a list of features which are part of the SharePoint Server Enterprise Site Collection features or is there an easier way to activate them all at a time instead of doing it one by one programmatically.

Site collection features VS. Mange site features

Site settings -> Site Collection Administration -> Site collection features VS Site Settings -> Site Actions -> Mange site features I would like to understand what is the difference between these consoles at the site collection level. I found this link to an explaination but it didn't make it clearer.  http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/97e184dc-6f78-4ee5-a95c-2cc564134798 Why when I deploy a custom feature with the target site, level does it go to to the Site collection features console and not the Manage site features console

sp2010 - move site template ( or site ) from one site collection to another ?

Is it possible to save a site as a template in site collection A and move it to site collection B ? Can this be done using out of the box functionality through the browser or do I need to use powershell or some other tool ? please advise. thanks and regards, Counie  

how to create site collection by using custom template through programmatically?

hi all, how we can create site collection by using custom template through programmatically? please give me some suggestions. where we need to save this custom template... thanks in advance..

which one is better site template or site collection template for creating site collection?

hi all, i want to create site collection by using custom template. So I created one site and i saved as a template and i want to use this site template to create site collection...can we use site template  or site collection template to create site collections? what is the difference between site template and site collection template? please advise me which one is better..... thanks in advance...

how to add custom site collection template in central admin site in SharePoint2010?

hi all, how can we add custom template in cendtral admin in sharepoint 2010? In 2007, we can add by using the stsadm tool addtemplate operation....but 2010 tremplate is saved as a solution file not a .stp file...so how we can add this template in central admin site in SharePoint 2010? Please give me some suggestions...... thanks in advance.....

how to create site collection by using custom template through programmatically?

hi all, how we can create site collection by using custom template through programmatically? please give me some suggestions. where we need to save this custom template... thanks in advance..

c# How to get list of site collection features?

If I have a web application url, how can I get a list of the currently installed site collection features programmatically?

Activate Language on more Site Collection with Script

Hi, I installed three Language Pack on a Sharepoint Server 2010, runned SPCONFIGUI.EXE and all work fine. Now I have to activate it for some existing Site Collections, so user can select the display Language. Will a Powershell or stsadm command allow me to do that in a script ? or must I change every Sites Settings manually ? (ca. 150 SC's !) Thanks

Programmatically activating an admin-approved form template to a site collection?



I am currently programmatically generating infopath forms with code-behind, and for each generated form, I need to be able to host the form template as a content type. Since I have a farm solution, I know that I would usually have to publish manually to admin-approved form template as opposed to form libraries or content types directly and afterwards create content types which reference those form templates. I was wondering what I would need to do to achieve the following results:

1) Programmatically activate a form template to a site collection (this is the big question mark for me)

2) Programmatically generate a content type which references said form template (I believe I already have this part down using the SP Object Model)

The environment I am building in uses SharePoint 2010 Enterprise Edition, InfoPath2010, .NET 3.5, VS 2010.

Any assistance would be MUCH appreciated.

how to automaticaly enable 10 features for a new created site collection


Dear all,

I was trying to have the new created sites with several features enabled by default. Any help on this would be much appreciated. Further more, if this is only possible with a lot of programming knowledge (what I don't have), is there a way to enable 10 features with one click after the site is created (say batch file or powershell)?

Thanks in advance,




Missing "SharePoint Server Enterprise Site Collection Features" in Site COllection Feature



All collection sites seem to be missing on the "SharePoint Server Enterprise Site Collection Features" in Site COllection Feature. However, I have PowerPivot uninstalled and reinstalled. Not sure if this could be the reason for it.


Error during site creation using template


Hi Team,


 I am trying to create a web site in web applications using site templates. I have other 3 sites created sucessfully following the same procedure.

Provisioning did not succeed. Details: The site template was not provisioned successfully. Delete this site collection in Central Administration, and then create a new site collection. OriginalException: The 'backupFolder' start tag on line 5 does not match the end tag of 'Configuration'. Line 6, position 3.

Any suggestions will be appreciated.



Activation of form template on site collection failed


I have checked and loaded an infopath form to Central Administration site. Then I try to activate the form template to my site collection and receive an error message. I found next in Log file

10/26/2010 09:37:49.54     w3wp.exe (0x14DC)                           0x11F0    InfoPath Forms Services           Administration                    82ep    Warning     Activation of form template on site collection http://site failed. (User: user,  Form Name: forma10, IP: , Request: http://site:2020/_admin/ActivateFormTemplate.aspx?templateId=a2caaaa0-e81f-4989-ac1e-5269e4dc28c7, Form ID: urn:schemas-microsoft-com:office:infopath:forma10:-myXSD-2009-06-02T06-46-10, Type: InfoPathLocalizedException, Exception Message: Activation could not be completed due to lack of funds to support InfoPath Forms Services.)    1e0da8dd-bd16-4c54-8abd-93ee888d6366

What can I do to fix that error?



New Site Collection creation error



In really need a hand here... im being investigating a lot but nothing.. here is the story


Moss 2010 + Project Server 2010 (production)

Application web http://moss


Can not remove or change the web aplication because i have a billion os critical sites there (Project server - Team foundation everithing working fine)


users admin1 admin2 admin3 all with farm/aplication administration privilleges

prob this was the issue: at some point i was helped by ms support grp to fix some xls webpart display credentials issues and we changes A LOT of things


Problem: i can not create new site collection in the aplication web http://moss error is

"The URL '/sitios/redinterna' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web."

but with all same admin acounts i can create new web aplications and new site collections inside them with no problem

i got the same issue if I try to create the web in any other managed paths even /

WebApplication: http://moss

manages path list

my                             ExplicitInclusion <== this is going to another iis soo

Problem with site creation by applying custom site template


Hi All,


 I am trying to create a sharepoint teamsite with the custom features such as teamsocumentlibrary, teamtasks, teamdiscussions, teamAnnouncements, teamevents, teamslinks. When I try to create I alwys get "#140001: The parent of the page, sps/teamspace/Freigegebene Dokumente/Forms/AllItems.aspx, is not in the structure store." I can't understand this my onet.xml is starts with <Project Title="$Resources:onet_TeamWebSite;" Revision="2" ListDir="$Resources:core,lists_Folder;" xmlns:ows="Microsoft SharePoint" Url="sps/teamspace"> and all the lists has the Url startswith "sps/teamspace/listName". 


Does anyone have any idea. If I try to create a site with another sitetemplate it works fine. 


I can't find more information about this in google as well. Any expericens please help.



Thanks in advance.

SharePoint Server Publishing feature--Can't activate on site (activated fine at site collection lev

I have five site collections and one of them seems to have an issue with the SharePoint server publishing feature, which is activated at the site collection level. On any of the sites underneath that site collection, the Server Publishing feature is not activated and throws this error when I try to activate:


One or more field types are not installed properly. Go to the list settings page to delete these fields.

 Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: f1915aff-39e6-4e99-ba2f-34faf71f3102

If I try to create an Enterprise Wiki, I get the same thing:

One or more field types are not installed properly. Go to the list settings page to delete these fields.

I won't be able to create the wiki until I can get the SharePoint Server Publishing feature activated.

Any one have any ideas? the other 4 site collections are fine.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend