.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

c# How to get list of site collection features?

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :SharePoint
If I have a web application url, how can I get a list of the currently installed site collection features programmatically?

View Complete Post

More Related Resource Links

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

SOLUTION: Renaming the Title list column globally across the site collection

So, you screwed up like I did, and modified the Title display name of the Item base content type and it has renamed ows_Title across every list in your site collection? Here's how you fix it: //WARNING //If you have come this far, be aware that this tool is a blunt axe. With it, you can cause //all sorts of mayhem and chaos in your site collection. So, to use this, you must be desperate. //or possibly dumb. Apparently, I'm just as dumb as you, because I did it. This is why I wrote //this stupid thing, so stupid people like us can go right on being stupid. //Your choice of weapon in this battle amuses me. Shall we begin? using System; using System.Collections.Generic; using System.Text; using Microsoft.SharePoint;   namespace RenameField {     class Program     {         static void Main(string[] args)         {             if (args.Length < 3)             {                 Console.WriteLine("Usage: RenameField <url-to-sitecollection> <internal-field-name> <new-fieldtitle>");               &n

CAML query to access List data across multiple site collection.

Hi   Is there any way to get the Task List data across multiple site collection using CAML query. Currently, I have the code which will retrieve the data from a single site collection. Below is the code.                           /***************************************************I am using Moss2007.Thanks!Ravi             SPSiteDataQuery q = new SPSiteDataQuery();             q.ViewFields = "<FieldRef Name=\"Title\" />" "<FieldRef Name=\"Status\" Nullable=\"TRUE\"/>";             q.Lists = "<Lists ServerTemplate=\"107\"/>";             q.Webs = "<Webs Scope=\"SiteCollection\"/>";             q.Query = "<Where>" +                                "<Eq>" +                                     "<FieldRef Name=\"Status\" />" + "<Value Type=\"Choice\">Not  Started</Value>" +                                     "</Eq>" +                         "</Where>";             DataTable dt=null;             using (SPSite s = new SPSite("http://banglabguest1:31000/"))             {                 SPWeb w = s.OpenWeb();                 dt = w.GetSiteData(q);                 w = null;             }                              *************************

can we use one SharePoint list throughout the site collection?


hi all,

I want to use one list which should be accessible with in the SiteCollection. When I am Creating the List it is available in that purticular site only but i want to use the in all the sites in the siteCollection. So Please tell me how we can use a list in all the sites of the Site Collection?

thanks in advance.................

Update all Properties in the User Information List after restoring a site collection to a new domain


hi All

I moved a site collection (content db) from one domain to another. After the site collection was restored i ran the stsadm -o migrateuser -oldlogin -newlogin. The result was that the login id of the user in the source domain was replaced with the login in the destination domain.

However the rest of the properties in the User Information List (paricularly interested in the Email) was not updated.

How can i get all the properties in the User Information List with values in the new domain

Thanks in Advance


Remove List Field Type under site collection


Hi All ,

We have a custom field created and added the same under a webapplication , now I would like to remove this field type from a specific site collection , can anybody suggest as how to go about the same .





Activate Features on Site Collection creation via Site Template


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?

Create workflow to create list item in calendar list of a DIFFERENT site collection


I work for a school district.  Each school has a SharePoint calendar.  We set up each school as its own site collection.  I would like to create a workflow that would send their calendar events to a district calendar, which is also its own site collection.

Example,  School A enters creates a new item on their personal school calendar.  They click YES in the column called SendToDistrictCalendar.  The workflow would be triggered to create this same item in the district calendar (which is in a different site collection) when SendToDistrictCalendar is checked YES.

We're using Windows Server 2003 with Windows SharePoint Services 3.0

I am a mid-level SharePoint user.  I would appreciate ANY and ALL help to make this work!!


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,




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.

WSS 3.0 Cross Site-Collection List Lookup


Hi all

New to Sharepoint here, so apologies if the question is unclear.

We would like to store centralised reference data in a dedicated site-collection and allow it to be accessed from other site-collections using list lookups. Can anyone recommend a webpart that would allow us to do this? I've found lots of cross-site list webparts, but not for crossing SC boundaries. Is there an OOTB feature that we could extend to achieve the same thing?




If you have found this post helpful, please click the 'Vote as Helpful' link (the green triangle and number on the top-left).

If this post answers your question, click the 'Mark As Answered' link below. It helps others who experience the same issue in future to find the solution.

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.


Designer Workflow: update list in another site within collection?

Is it possible with a Designer 2007 created workflow to update an list in another site within the same collection?  I don't see a way to do that and am wondering if I am missing something.
There are no mistakes; every result tells you something of value about what your are trying to accomplish.

Copy list from one site to another site in same collection

What is the easiest way to copy a list from one site to another in the same site collection and still keep the meta data (e.g. created by, modified by)?  Can this be done through SharePoint Designer?

Adding List from another Site Collection


I want to add a list to as a web part on my page in Sharepoint 2007.


The catch is that the list is part of another site collection.

How do I sort this out.


I tried to go to the Data Source Library through Sharepoint Designer and tried adding a new Library.

But the lists from that Site Collection doesn't show.


Is there another way to do this?



trouble moving list to another site in collection


I am trying to use the process for moving a list to another site: http://blog.henryong.com/2008/01/21/how-to-movemigrate-sharepoint-list-itemsdocuments-and-preserve-metadata-properties-at-the-same-time/at-the-same-time .

I get this error:

An error was encountered performing this operation.


Operation to Move 'Remove scroller in lower right corner' to '/sites/itd/SBTD/Lists/Website Requests' Failed
No items were moved. Please remove Remove scroller in lower right corner from the selection and retry operation

Can anyone tell me what went wrong.  Could not find referece to this error.  What scroller are they talking about?

There are no mistakes; every result tells you something of value about what your are trying to accomplish.

Features not appearing in Site Collection Administration



I wrote a Feature in Visual Studio 2010, deployed it successfully. The feature got activated without any issue.

But my concern is why is it not appearing it under "Site Settings" even though in my elements.xml file I have given

<Custom Action Id="MyAction" GroupId="SiteAdministration" Location="Microsoft.SharePoint.Settings" .../>

I want this feature to appear under SiteSettings as an activated feature, am I doing something wrong?


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