Now a days, i am fighting with SharePoint 2010 new features, that was more interesting……..
Coming to the point, SharePoint Server 2010 Enterprise edition provides a “Business Intelligence Center” Site template. Before going to create a site for Business Intelligence, we have to ensure some features are activated.
Note: “Business Intelligence Center” only available in SharePoint Server 2010 Enterprise edition.
Features to be activated before creating “Business Intelligence Center”,
-
SharePoint Server Publishing infrastructureSharePoint Server Publishing feature enables the publishing components needed for Business Intelligence center.
-
PerformancePoint Services Site Collection FeaturesEnables the Business Intelligence Center Site Template, Content types, master page & layouts etc…
Note: “SharePoint Server Publishing Infrastructure & PerformancePoint Services Site Collection Features” features should be activated in Site-Collection level.
To avoid the unexpected error on Site creation, we must enable the above mentioned features.
After activating features, we can create BI site without getting any error.
The most pages are used by Central Administration in Windows SharePoint Services 3.0 are located under 12 Hive\Templates\Admin. The virtual location of these pages can be mentioned as SiteUrl/_admin/Page.aspx
I list out those pages in following table.
|
Page Title |
Server Relative URL Location |
Description |
| AddContentDatabase | /_admin/newcntdb.aspx | This page used to create a new content database or to add an existing content database to this web application |
| AddIncomingUrl | /_admin/AddIncomingUrl.aspx | This page used to add an internal url to the web application. |
| AdminDirectory | /_admin | |
| AlternateUrlCollections | /_admin/AlternateUrlCollections.aspx | This Page list out the alternate url’s available in the farm or particular web application. |
| ApplicationCreated | /_admin/applicationcreated.aspx | This page comes out after the creation of web application. |
| ApplicationManagement | /_admin/applications.aspx | This page contains links to pages that help you configure settings for applications and components that are installed on the server or server farm. |
| AuthenticationProviders | /_admin/authenticationproviders.aspx | This page list out the zone and membership providers of the web application. |
| Backup | /_admin/Backup.aspx | This page list out the Web applications for backup. |
| BackupHistory | /_admin/BackupHistory.aspx | Use this page to manage the history logs for backup and restore operations. |
| BackupStatus | /_admin/BackupStatus.aspx | Use this page to view the backup or restore job status. |
| BlankImage | /_layouts/images/blank.gif | |
| ConfigureUpgradeDatabases | /_admin/ConfigureUpgradeDatabases.aspx | |
| ContentDatabaseSettings | /_admin/oldcntdb.aspx | Use this page to manage content databases for the selected web application |
| CreateExternalUrl | /_admin/CreateExternalUrl.aspx | use this page to create an External resource mapping. |
| CreateSite | /_admin/CreateSite.aspx | This page used to create a new top-level Web site |
| Default | /_admin/default.aspx | |
| DeploySolution | /_admin/DeploySolution.aspx | This page has a list of the Solutions in the farm. |
| DspSettings | /_admin/dspsettings.aspx | This page contains settings for data retrieval services. |
| EditOutboundUrls | /_admin/EditOutboundUrls.aspx | Use this page to edit the public zone URL’s of the web application |
| Error | /_layouts/error.aspx | |
| ExtendVs | /_admin/extendvsoption.aspx | Use this page to create a new Windows SharePoint Services application or to extend an existing application to another IIS Web Site. |
| FarmCredMgmt | /_admin/FarmCredentialManagement.aspx | Use this page to manage the service accounts in the farm. |
| FarmServers | /_admin/FarmServers.aspx | This page has a list of the Servers in the farm. |
| GradualUpgrade | /_admin/GradualUpgrade.aspx | |
| HomePage | /default.aspx | |
| JobEdit | /_admin/JobEdit.aspx | Use this page to change or delete a timer job. |
| ManageContentDatabases | /_admin/cntdbadm.aspx | Use this page to manage content databases for this web application. |
| Operations | /_admin/operations.aspx | This page contains links to pages that help you manage your server or server farm, such as changing the server farm topology, specifying which services are running on each server, and changing settings that affect multiple servers or applications. |
| Owners | /_admin/owners.aspx | Use this page to view and change the primary and secondary site collection administrators for a site collection. |
| Policy | /_admin/policy.aspx | This Page used to manage the Policy for the web application. |
| PolicyAnonymous | /_admin/policyanon.aspx | This page has the Policy settings for the anonym ous users of the Web application. |
| PolicyRole | /_admin/policyrole.aspx | Use this page to add the Permission Policy level for the web application. |
| PolicyRoles | /_admin/policyroles.aspx | Use this page to manage the permission levels for the web application. |
| PolicyUser | /_admin/policyuser.aspx | Use this page to add the policy for the users in Web application. |
| Restore | /_admin/Restore.aspx | Use this page to restore from backup. |
| RestoreStep1 | /_admin/RestoreStep1.aspx | Use this page to get the Backup file location of the web application. |
| RestoreStep3 | /_admin/RestoreStep3.aspx | Use this page to restore the specific content from the web application. |
| RetractSolution | /_admin/RetractSolution.aspx | This Page used to retract the solution from the web application. |
| RevertUpgrade | /_admin/RevertUpgrade.aspx | Use this page to revert back to the previous version environment. |
| SelectAlternateUrlCollection | /_admin/SelectAlternateUrlCollection.aspx | Use this page to select the alternate URL for the web application. |
| SelectServer | /_admin/SelectServer.aspx | Use this page to select the server from server collection. |
| SelectService | /_admin/SelectService.aspx | Use this page to select the service from the service collection. |
| SelectSite | /_admin/SelectSite.aspx | Use this page to select the SiteCollection from Web Application. |
| SelectWebApplication | /_admin/SelectWebApplication.aspx | Use this page to select the Web Application from the collections of Web Applications. |
| Server | /_admin/Server.aspx | This page has the list of service from the Server. |
| ServiceJobDefinitions | /_admin/ServiceJobDefinitions.aspx | This page has a list of the timer job definitions of the server or web application. |
| ServiceRunningJobs | /_admin/ServiceRunningJobs.aspx | This page has a list of the timer jobs running in Web Application. |
| SiteCreated | /_admin/SiteCreated.aspx | This page displays after the creation of SiteCollection. |
| SiteUpgrade | /_admin/SiteUpgrade.aspx | |
| SiteUpgradeSummary | /_admin/SiteUpgradeSummary.aspx | |
| Solutions | /_admin/Solutions.aspx | This page has a list of the Solutions in the farm. |
| SolutionStatus | /_admin/SolutionStatus.aspx | Use this page to list the Status for the Solution of the web application. |
| StartBackup | /_admin/StartBackup.aspx | Use this page to include the content in backup of the web application. |
| TargetWebApplication | /_admin/TargetWebApplication.aspx | |
| UnextendVs | /_admin/unextendvs.aspx | Use this page to remove Windows SharePoint Services from an IIS Web site. |
| UpgradeSettings | /_admin/UpgradeSettings.aspx | |
| UpgradeStatus | /_admin/UpgradeStatus.aspx | Use this page to see the status of a timer-based upgrade. |
We can see this list of pages in Microsoft.SharePoint.Administration.AdminPages internal Class from the Microsoft.SharePoint Assembly.
SharePoint Lists are enabled with multiple content types, because of that we can add items with different type of properties and documents. In advanced, the New Menu displays those Content type available in List as its sub-menu.
Fig1 Content Types Visible in New Menu
So how the SharePoint displays those Content types under New menu and how we can enable and disable those content types under that new Menu.
So here is the simple snippet to list out the content types enabled in New Menu.
SPList list = web.Lists["ListName"];
IList<SPContentType> ctoFolder = list.RootFolder.UniqueContentTypeOrder;
foreach (SPContentType ctype in ctoFolder)
{
Console.WriteLine(ctype.Name);
}
UniqueContentTypeOrder of SPFolder member lists out the Content Types visible on New Menu. Now we’ll see the code for removing the ContentType on New menu.
SPList list = web.Lists["ListName"];
IList<SPContentType> ctoFolder = list.RootFolder.UniqueContentTypeOrder;
//Code for removing the Content Type sub-menu in New Menu.
//Removing the "Test Content Type" menu under New Menu
for (int i = ctoFolder.Count – 1; i >= 0; i–)
{
if (ctoFolder[i].Name == "Test Content Type")
{
ctoFolder.Remove(ctoFolder[i]);
}
}list.RootFolder.UniqueContentTypeOrder = ctoFolder;
list.RootFolder.Update();//Code for adding the Content type sub-menu under New Menu
//Adding the "Test Content type" menu under New Menu
SPContentType ctype = list.ContentTypes["Test Content Type"];
ctoFolder.Add(ctype);
list.RootFolder.Update();
The above helps us to enable and disable the Content type on New Button in SharePoint List.
By SharePoint object model, how we can get all the sites with sub sites and the top-level sites alone separately.
The following snippet which returns all the sites and sub-sites from the site collection.
SPSite site=new SPSite.AllWebs;
and if we want only the top-level sites from the sitecollection, we have to call the SPWeb object.
SPWebCollection webs=site.RootWeb.Webs;
and webs[0].Webs; returns the sub-sites from that particular web object.
Hello guys, few weeks I had a busy schedule, so I can’t concentrate on blogging. Now I’m back with more ideas to be shared with you all.
Here I’m going to give you a simple snippet of "Retrieving the content type enabled lists" from the site using Client Object Model.
ClientContext context = new ClientContext("http://localhost");
Web web = context.Web;//Load all the lists from web
ListCollection listCollection = web.Lists;
//Filters the lists has the content type enabled
context.Load(listCollection,
lists => lists
.Include(list => list.Title)
.Where(list => list.ContentTypesEnabled)
);
//Execute the Query
context.ExecuteQuery();
Console.WriteLine("Lists enabled with ContentType:");
//Print the Content type enabled lists
foreach (var list in listCollection)
{
Console.WriteLine(list.Title);
}
The above code only returns the List collection from particular web, those are content type enabled. Next time, I’ll back with another interesting SP2010 snippet.
In SharePoint out-of-Box, we can’t able to add the internal name for the SharePoint field i.e., Columns. But we can enable that by modifying the Create column page on 12 Hive.
For that we have to modify the FldNew.aspx page, that is available under 12 Hive\TEMPLATE\LAYOUTS folder.
Before modifying, take a copy of that file.
Step 1: Open the file and search for this line,
<INPUT type="hidden" value=<%SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(strName),Response.Output);%> name="Name">
Step 2: Replace the above line with the following codes,
<!– Internal Name –>
<TR>
<TD class=ms-sectionline height=1 colspan=4><IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt=""></TD></TR>
<TR>
<TD nowrap></TD>
<TD class="ms-descriptiontext" valign="top">
<TABLE border=0 cellpadding=1 cellspacing=0>
<TR><TD height=28 valign=top class=ms-sectionheader id=onetidNewColumnOption><H3 class="ms-standardheader"><SharePoint:EncodedLiteral runat="server" text="Internal Name" /></H3></TD></TR>
<TR><TD class="ms-propertysheet" id=onetidNewColumnOption2><SharePoint:EncodedLiteral runat="server" text="Type an internal / static name for this column." EncodeMethod=’HtmlEncode’/> <BR/> <BR/></TD></TR>
</TABLE>
</TD>
<TD class="ms-authoringcontrols" width=10> </TD>
<TD class="ms-authoringcontrols" ID=onetidFldEditGuts2><LABEL for="idInternalColName"><SharePoint:EncodedLiteral runat="server" text="Internal Name" EncodeMethod=’HtmlEncode’/></LABEL><FONT size=3> </FONT><BR>
<TABLE border=0 cellspacing=1>
<TR>
<TD colspan=2>
<INPUT class="ms-input" title="<SharePoint:EncodedLiteral runat=’server’ text=’<%$Resources:wss,fldedit_columnname%>’ EncodeMethod=’HtmlEncode’/>" type="text" value=<%SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(strName),Response.Output);%> name="Name" MaxLength=255 size="<SharePoint:EncodedLiteral runat=’server’ text=’<%$Resources:wss,fldedit_idDisplayNameSize%>’ EncodeMethod=’HtmlEncode’/>" />
</TD>
</TR>
</TABLE>
</TD>
</TR>
Step 3: Now the page is enable with the internal name. Now we can enter the different name for Internal name and display name on creating a new column.
cheers.
SharePoint 2010 now supports the client side programming using Client API Classes and namespaces. Using those class references, we can see how to retrieve the list of Site collection groups.
Before start the code, add the two namespaces Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime as references to the project.
The above mentioned two DLL’s are available under " SharePoint Root > ISAPI "
using Microsoft.SharePoint.Client;
———–
ClientContext context = new ClientContext("http://spserver");
Web web = context.Web;
GroupCollection groups = web.SiteGroups;
context.Load(groups);
context.ExecuteQuery();
foreach (Group grp in groups)
{
Console.WriteLine(grp.Title);
}
Console.WriteLine("Press any key to continue…");
Console.Read();
Declare the ClientContext to get the context information of a site collection and then load the site collection groups to the that. Then execute the ClientContext using context.ExecuteQuery() to retrieve the collection of groups available under particular SharePoint Site Collection.
The result we got for the above mentioned code as follows,
Now, SharePoint 2010 coming with a new gallery for themes. We can view that theme gallery on the following url, http://server/_catalogs/theme/Forms/AllItems.aspx
Now we can upload and store the themes to Themes gallery. The themes in this gallery can be used by this site or any of its sub sites.
To apply the theme for SharePoint site, follow the steps given below,
1. Home –> Site Actions –> Site Settings
2. Under Site Settings page search for the link named and click “Site Themes” under the “Look and Feel Category”
3. Site Theme page list out the themes available in Themes gallery and the styles available in that theme.
4. We can also customize the colors of the theme by modifying the color, those are list out in “Customizing Theme” category.
5. Preview button will be available on this page to view the modified theme. The url for the preview page is,
.thmx”>.thmx”>.thmx”>http://server/SitePages/Home.aspx?ThemeOverride=/_catalogs/theme/ .thmx
*Change the name to Theme Name.
6. Click OK to apply the theme to SharePoint site.
The Predefined themes available on SharePoint 2010 are,
Default (no theme)
Azure
Berry
Bittersweet
Cay
Classic
Construct
Convention
Felt
Graham
Vantage
When we compared to the SharePoint hive folder with previous editions, some additional folders are available.
In SharePoint 2010, the physical path leads to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14 instead of folder 12.
New folders available in SharePoint Hive folder are,
- Policy
- UserCode
- WebClients
- WebServices
Another interesting SharePoint new feature. SharePoint 2010 now coming with a new management console called, “SharePoint Management Shell”. Which contains the Powershell cmdlets for SharePoint, by using this we control and manage the SharePoint operations like we done in STSADM command.
To know more information on SharePoint Management Console and basic cmdlet operation, Zach Rosenfield blog was the starting point for that. Using this tool, Now I am going to show a SharePoint cmdlet to install and activate the feature.

To Install feature,
PS> Install -SPFeature <FeatureFolderName>
To activate the feature for the site,
PS> Enable -SPFeature <FeatureFolderName> -Url http://server/subsite
Cheers, Stay tuned for the next “What’s New Feature“….
