SharePoint24x7 It's all about SharePoint.


Tips n Tricks – Reducing the SharePoint Config Log file size

Posted by Joy

Today we came across with a situation where we keep getting a runtime error when we try to perform our normal day-today operations in our SharePoint 2013 based solution. It started throwing a runtime error with a error code - HRESULT: 0x80131904 and it failed to save data into the SharePoint database.

The reason was the SharePoint Configuration database LOG file has grown to 91 GB and there was not enough free space in the physical disk. Because of this, SharePoint was unable to commit database changes and there was a huge performance impact. The solution we found was:

  1. Change the recovery model for the Database from Full to Simple
  2. Shrink the database

I executed the following SQL command and it brought the database log file from 91GB to 1 MB which solved my issues.

USE [master]


USE [SharePoint_Config]

DBCC SHRINKFILE ('SharePoint_Config_Log')


Article – Host-named Site Collections

Posted by Joy

Host header or Host-named?

I know for most of us, at the beginning, these 02 terms, what they are and difference between these 02 are very confusing. I'm writing this to help you understand it very easily.

Prior to SharePoint 2013

With the early releases of SharePoint, when we wanted to create a new Site Collection, we had 2 options to define their URLs:

  1. Rely on physical server name and port combination
  2. Rely on host header paths

Physical server name and port combination

This was the case we used to rely on almost all the developer environments. We ended up having web application URLs attached to the physical server name and port combination, similar to:

Site Collections we created using this approach ended up having URLs similar to:

Host header path

As an alternate, this approach helps us to address some of the issues we faced in the previous approach. With this approach we will create a Web Application by assigning a user-friendly host header such as We depend on either local hosts file (in case of development environments) or DNS (in case of staging and production environments) for mapping host header to the server IP and port. With this approach, we can have URLs similar to:

With this approach, we will be able to overcome the main issues we faced with the physical server name and port combination URLs approach. However, what if we want to create site collections with following URLs:

With any of the above 02 approaches, to implement URLs like shown above, we need to create multiple web applications each pointing to above host headers as their starting URL. Because, host headers are assigned for Web Applications and we cannot assign multiple host headers for the same Web Application. Having to creating multiple Web Applications to implement above URLs schema is not going to be a practical solution since:

  • There is a limitation of no of Web Applications which can be hosted in farm
  • Creating lot of Web Applications will introduce additional processing overhead to the farm

With SharePoint 2013

With SharePoint 2013, we can solve the above problem with an approach called Host-named Site Collections. With Host-named Site Collections approach, we can create Site Collections with user-friendly URLs with different domain names within the same Web Application. With Host-named Site Collections approach we can create following Site Collections within the same Web Application:

Now we can have just 01 Web Application, with multiple user-friendly URLs, with different domain names in them as the starting point for Site Collection URLs.

Note: though, it's a very useful approach, creating Host-names Site Collections is little tricky since it can be created only by using Windows PowerShell and cannot be created using SharePoint Central Administration web site.


Article – What’s New for SharePoint Development in Visual Studio 2012 – Part I

Posted by Joy

Microsoft released Visual Studio 2012 back in September 2012. Visual Studio 2012 comes with number of new features and number of enhancements for Windows, Web, SharePoint, Mobile and Cloud development areas.

Microsoft released SharePoint 2013 also back in November 2012. Microsoft announced that Visual Studio 2012 is the official IDE for developing applications for SharePoint 2013. Not only that, Visual Studio 2012 supports developing application for SharePoint 2010 as well. What a wonderful release..?

With this and number of upcoming posts, I’m going to showcase some of the cool features available in Visual Studio 2012 for SharePoint developers.

As the start, following are the list of new and enhanced features available in Visual Studio 2012 for SharePoint development:

  • Streamlined SharePoint Project Templates
  • Create Lists and Content Types by Using New Designers
  • Create Site Columns
  • Create Silverlight Web Parts
  • Publish SharePoint Solutions to Remote SharePoint Servers
  • Test SharePoint Performance by Using Profiling Tools
  • Create Sandboxed Visual Web Parts
  • Better IntelliSense support in Sandboxed solutions
  • Better support for JavaScript Debugging and IntelliSense for JavaScript
  • Test Your Code by Using Microsoft Fakes Framework
  • Apps development support for Office and SharePoint 

I will be writing number of future posts to discuss some of these useful features in details. Please have faith.


Article – Custom Windows PowerShell Scripts and Local Execution Policy

Posted by Joy

Windows PowerShell supports authoring PowerShell scripts and executing them. You can write Windows PowerShell scripts using any text editor and save them with “.ps1” file extension. You may have encountered the following error when you were trying to execute your PowerShell script and this post explains the story behind this error and how to eliminate it.

I have written a very simple PowerShell script which displays “Hello, World..!” and saved into a script file names “Hello.ps1”.

write-host "====================================="
write-host "Hello, World..!"
write-host "====================================="

When I try to execute the script file using Windows PowerShell command line, I get the following error:


The reason for this is, once Windows PowerShell is configured in your server, it configures the local execution policy of your server to restricted mode to avoid any attackers to come across the network and execute any PowerShell scripts and harm your environment. Which means, no scripts can be executed without signing your scripts with a Public-Private Key pair.

You can retrieve the current mode of the local execution policy by executing following command:

PS C:\> Get-ExecutionPolicy


Following are the different modes of the local execution policy:

  • Restricted – scripts will not execute under this execution policy without signing with a Public-Private Key pair
  • Unrestricted – scripts can execute under this execution policy. However, the scripts which are not signed will continue to prompt for username and password.
  • Bypass – scripts can execute under this execution policy and it will suppress prompting for username and password

Set the execution policy to unrestricted or bypass by using following command:

PS C:\> Set-ExecutionPolicy unrestricted

Now you can run your script files and they will continue to run without complaining.

Important thing to know when we are working with SharePoint is that, installing SharePoint will loosen the execution policy to unrestricted in all the Application servers and Web Front End servers.


Article – SharePoint and Search Product Acronyms. Are you also confused?

Posted by Joy

We had a good session on Microsoft FAST Search Server 2010 for SharePoint (FS4SP) few day ago and the idea was to introduce Enterprise Search concepts within our SharePoint CEG. During the session, the guy who presented touched few products related to SharePoint and Search and I noticed some of the attendees were confused with all these product names and their acronyms.

Yes, there are lot of choices from Microsoft now when we want to implement Enterprise Search or Search driven applications with or without SharePoint. Unfortunately, most of these product names are very long and we don't have any other choice rather than using their acronyms.

Based on my readings, studies and investigation, following is a list I came up with for a list of products and their acronyms related to SharePoint and Search:

Acronym Full Product Name
SPF Microsoft SharePoint Foundation 2010
SP Microsoft SharePoint Server 2010
SP-FIS Microsoft SharePoint Server 2010 for Internet Sites – Standard
SP-FIS-E Microsoft SharePoint Server 2010 for Internet Sites – Enterprise
Acronym Full Product Name
MSS Microsoft Search Server 2010
MSS-X Microsoft Search Server 2010 Express
FS4SP Microsoft FAST Search Server 2010 for SharePoint
FS4SP-IS Microsoft FAST Search Server 2010 for SharePoint Internet Sites
FSIS Microsoft FAST Search Server 2010 for Internet Sites
FSIA Microsoft FAST Search Server 2010 for Internal Applications
Hope this helps you..?

Article – Microsoft Office 365 Desktop Setup

Posted by Joy

With the introduction of Office 365, I see lot of customers are very interested on moving to the Cloud. If we look at the industry today, majority of customers have any form of Cloud presence – Public, Private or Hybrid.

Some customers have gone completely into either public or private cloud and some are still use both on-premise and online with Hybrid model. No matter which deployment it is, it support content access and collaboration using any devices including Mobile, Tab, Laptop and Desktop.

When we use any platform, first we need to make sure that we meet minimum software requirements for the particular platform in order to unlock full feature set and  there no excuse for Office 365 as well. Office 365 team simplifies our process of getting your desktop configured with minimum software requirements with an automated installation process called Office 365 Desktop Setup.

Office 365 Desktop Setup is an installer that checks for and provides important software updates to keep your system synchronized with Office 365. These updates provide seamless integration and better user experience with Office 365.

Office 365 Desktop Setup helps you to meet following software requirements:

  • Client Operating System – Windows XP SP3 with IE 7 or Windows Visa SP2 or Windows 7 or Windows Server 2008 R2
  • Client Office version – 2007 Office system SP2 or Office 2010

After you have signed in to the Office 365 portal for the first time, you should run the Desktop Setup on your computer. If you are working on multiple devices, make sure run Desktop Setup on all those devices.

How to run Microsoft Office 365 Desktop Setup?

  1. Sign in to the Office 365 portal using your Microsoft Online Services ID. URL for Office 365 portal is
  2. In the right side pane, under Resources, click Downloads.
  3. Downloads page provides 3 steps for Installing Office Professional Plus, Installing Lync and Running Office 365 Desktop Setup.
  4. Got to Step 3 - Set up and configure your Office desktop apps, and click Setup.
  5. It prompts you for asking privileges to download and run Desktop Setup, and click Run.
  6. Desktop Setup will be downloaded.
  7. Once Office 365 Desktop Setup started, you need to sign in using your Microsoft Online Services ID.
  8. Once you are logged in, Desktop Setup will start checking the configuration of your desktop against minimum software requirements for Office 365.
  9. It then prompts you with the updated required and you can select which updates you need to install depending on the services your organization has subscribed for. Select the updates you wish to install, and click Continue.
  10. You are then prompted to accept license agreement. click I accept.
  11. Microsoft Office 365 Desktop Setup will start installing and configuring the updates based on your selection. This may take a few minutes. Get some rest Smile.
  12. Once installation and configuration is finished, it shows following screen with the name of the component installed/ configured and the status. And if there are any additional manual configuration required, following screen also will provide links to TechNet or MSDN articles.

Now you have installed and configured your desktop with minimum software requirements to enjoy Office 365.

Enjoy Office 365 Smile.


Article – What are the Service Applications that can be partitioned?

Posted by Joy

SharePoint 2010 provides number of enhancements and new features compared to previous version – MOSS 2007. One of the enhancement is Multitenancy. Multitenancy has been greatly enhanced with the SharePoint 2010 release. One of the new features which backups so many other enhancements and new features is Service Application Framework which is the new face of Shared Services Provides in MOSS 2007. Multitenancy in SharePoint 2010 has been greatly enhanced with the introduction of Service Application Framework.

Services Application Framework allows different Web Application to utilize different Service Applications depending on the need. It also provides Service Application partitioning which helps organizations to implement Multitenancy so that each tenant can have it’s own set of Service Applications and tenants will be able to manage the information boundary.

Having said that, the first question come to our mind (rather my mind) is that which Service Applications support this partitioning and storing tenant specific data? Not only me, lot of organizations who are planning to implement Multitenancy will have the same question trying to figure it out which Service Applications provide partitioning and storing tenant specific data.

Here is the answer…

Service Application Name

Can be Partitioned?

Can store Tenant data?

Access Services



Business Connectivity Services



Excel Calculation Service



FAST Search for SharePoint



Managed Metadata Service



PerformancePoint Services



PowerPoint Service



Project Server Service



Usage and Health Data Service



User Profiles Synchronization Service



Search Service



Subscriptions Settings Service



State Service



Web Analytics Service



Word Conversions Service



Word Viewing Service



Visio Graphics Service



Hope this helps you a lot..?


Article – Document ID Service in SharePoint 2010

Posted by Joy

Document ID Service is one of the brand-new features introduced into Content Management workload in SharePoint 2010. Microsoft introduced this new featured as part of SharePoint 2010 release after hearing a lot to customer feedback. Let us explore this new feature and see how valuable it is to your content management solutions.


SharePoint is a product by nature uses a very much de-normalized database in order to provide most of its powerful features. How SharePoint manage data stored within is using lots of GUIDs. Every Site, List, Library, Item, etc… get assigned a GUID by SharePoint. GUIDs are like {776E22FB-E38E-45BB-B606-20F5785D49A5} and not human friendly. Every item/ document get stored in Lists and Libraries get assigned a GUID internally and SharePoint uses that ID to work with the content. But most of the organizations uses non-GUID based (more human friendly) identifiers to identify content uniquely. How can we assign human friendly unique identifiers to the contend stored within SharePoint?


SharePoint 2010 comes with a brand-new feature called Document ID Service to assign a human friendly unique identifier to the content stored within SharePoint.

Why do we need to use Document ID Service and why can’t we use ID field already available in my list? ID column is a unique integer based identifier for the content stored within a single list or library. Those integer based identifies are not unique across lists and libraries. Identifiers generated by Document ID Service are unique across all the lists and libraries in a given Site Collection.

Let’s first examine the ID column and it’s limitation before we move to Document ID Service.

Task 1: Enable ID column in List/ Library Views

  1. For Libraries, select the Library Settings from the Library tab in the ribbon. For Lists, select List Settings from the List tab in the ribbon.
  2. Scroll down until you get to Views section.
  3. Click the View you want to include the ID column. It will be easy if you select the Default View.
  4. Check/ Enable the ID column from the Columns group.
    ID Column
  5. Click OK.
  6. Upload some documents and see how SharePoint assigns integer based IDs to individual items.
    Assigned ID
  7. Repeat steps 1 through 6 to a another List or Library and investigate to see that this ID column is unique only for list/ library level and not across all the lists or libraries within the site.

Now that we are ware that ID column in Lists and Libraries are scope to individual lists and libraries and it does not provide a way of identifying items/ documents uniquely across lists and libraries using a human friendly manner.

This is where we need Document ID Service which comes with SharePoint 2010. Let us configure Document ID Service and explore its capabilities

Task 2: Enabling Document ID Service

Document ID Service is a Site Collection scope feature and it provides unique identifies for content stored in lists and libraries within a Site Collection.

Perform following tasks to enable Document ID Service feature:

  1. Select Site Actions –> Site Settings and navigate to Site Settings page.
  2. Select Site collection features from Site Collection Administration section in Site Settings page.
  3. Locate the Document ID Service feature and activate it by clicking Activate button.
    DI Feature Acitivation
  4. Navigate back to Site Settings page by selecting Site Actions –> Site Settings link and now you will notice a new link called Document ID settings was introduced inside Site Collection Administration section.
    ID Settings Link
  5. Select Document ID settings link to configure Document ID Service settings
  6. Make sure that Assign Document IDs option is checked/ selected. Specify alphanumeric value based on your organization information policies into the field Begin IDs with the following characters:. Document IDs will always start with whatever your specify in this text box. I have specified TEAM since I want all the IDs to begin with that.
    ID Settings Page
  7. Click OK to continue. In case if you have already configured Document ID Service and you have been using for sometime, you may visit to this page if you want to either disable document ID assignment or to change the leading text for the IDs generated.

Task 3: Enable Document ID column in List/ Library Views

  1. For Libraries, select the Library Settings from the Library tab in the ribbon. For Lists, select List Settings from the List tab in the ribbon.
  2. Scroll down until you get to Views section.
  3. Click the View you want to include the Document ID column. It will be easy if you select the Default View.
  4. Check/ Enable the Document ID column from the Columns group.
    Enable Document ID
  5. Click OK..
  6. Upload some documents and see how SharePoint Document ID Service assigns based IDs to individual items.
    Assigned Document ID
  7. Repeat steps 1 through 6 to a another List or Library and investigate to see that the IDs generated by Document ID Service are unique across all the lists and libraries within a Site Collection boundary.

As you can see Document ID Service generates unique identifiers (IDs) starting with the value provided within the Document ID settings page and this ID is unique across all the lists and libraries within a Site Collection boundary.

One other advantage of Document ID Service is that SharePoint provides a specific URL for end-users to retrieve documents by passing the ID generated by Documents ID Service, no matter where they are within the site collection. Simply paste the Document ID to the following URL to retrieve the document.

http://[Web Application]/_layouts/DocIdRedir.aspx?ID=[Document ID]

I’m sure that you are aware of the value of the Document ID Service and will be part of your next Content Management solution.


Enabling Developer Dashboard in SharePoint 2010

Posted by Joy

ASP.NET provides Call Stack and Tracing as wonderful features which helps developers on investigating what is going on page rendering behind the scene. SharePoint being a product which provides bunch of features OOTB which we can use to setup a portal very easily, it hides most of these information.

Back in MOSS 2007, we had to scratch our head thinking where to start our investigation when we get an error in the browser, because that error was not descriptive enough for us to start the investigation.

In SharePoint 2010, we have a nice feature – Developer Dashboard which helps developers to be comfortable when they see an error in the browser.

Enabling Developer Dashboard

Developer Dashboard is a feature targeted for developers (administrators as well) and hence it is disabled by default. We need to enable it using one of the method mentioned below:

  • PowerShell
  • SharePoint Object Model

We still can use STSADM with SharePoint 2010 for administering SharePoint. However, STSADM is more likely to disappear in the next release. Though we can use following STSADM command to enable Developer Dashboard, I strongly recommend to get familiar with PowerShell, if you are not already.

  1. Go to the command prompt and make sure to either set the path to the location of STSADM.EXE or navigate to the bin directory in SharePoint root in your command prompt.
  2. Issue the following command in the command prompt:STSADM -o setproperty -pn developer-dashboard -pv ondemand

The above command will enable the Developer Dashboard in On Demand mode.

  1. Go to Start –> All Programs –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Management Shell
  2. Issue the following command in the management shell:$devdash = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
    $devdash.DisplayLevel = ‘OnDemand’;
    $devdash.TraceEnabled = $true;

The above command will enable the Developer Dashboard in On Demand mode.

SharePoint Object Model
  1. Create a Console Application, Windows Application or Web Site and add a reference to the Microsoft.SharePoint.dll assembly.
  2. Add using Microsoft.SharePoint.Administration namespace reference at the top of the code (C#) file.
  3. Add the following code into your code (C#) file to enable Developer Dashboard:SPWebService svc = SPContext.Current.Site.WebApplication.WebService;
    svc.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.OnDemand;

The above command will enable the Developer Dashboard in On Demand mode.

I have used On Demand as the setting for Display Level of the Developer Dashboard and following are the other options we can specify:

  1. On – Enable the Developer Dashboard all the times
  2. Off – Disable the Developer Dashboard
  3. OnDemand – Enable the Developer Dashboard but will be displayed on demand.

When you enable Developer Dashboard in On Demand mode, following icon will be displayed next to your login name.


On click of the Developer Dashboard icon, page will be reloaded and Developer Dashboard will be displayed at the bottom of the page as shown below:


If you have also used TraceEnabled = $true switch with PowerShell, then you will see a link says “Show or hide additional tracing information …” at the end of the Developer Dashboard which allows you to show/ hide ASP.NET Tracing information as shown below:


Isn’t this a awesome feature for you to get started your investigation exercise? Have a closer look at what Developer Dashboard offers you and it will help you in numbers of ways.


Fix it – Configuring Object Cache service

Posted by Joy

If you are using Web Content Management (WCM) solutions implemented with SharePoint 2010 Publishing Infrastructure features, you will notice following Critical error in your server Event Log.


What does it mean and how do you fix this?

This error is generated by SharePoint’s Object Cache service. In order to get rid of this error, you will have to configure Object Cache service.

What is Object Cache service?

Object Cache is a very powerful built-in service in SharePoint 2010 Publishing Infrastructure which instructs every Web Front End (WFE) to cache object properties in order to boost the performance. This reduces the load on SQL Server tremendously by reducing number of round trips required to retrieve same data from the content databases. In scenarios where you have Web Content Management solutions which go through less content changes, by configuring Object Cache, you can reduce the latency and increase the throughput.

Configuring Object Cache is all about configuring User Policies for each and every Web Applications. Object Cache is configured at the Web Application level and you need to have 02 AD user accounts for configuring Portal Super User and Portal Super Reader. Portal Super User account has full control and Portal Super Reader account has full read-only access.

Let us begin the configuration.

Task 1 – Create required AD accounts

You need to create 02 service accounts in order to configure Portal Super User and Portal Super Reader. Go to Active Directory and create 02 service accounts.

I already have 02 service accounts created named, SP_ObjectCacheUser and SP_ObjectCacheReader.


Task 2 – Configure Object Cache User Accounts using CA

Initial configuration done using CA.

  1. Fire up the SharePoint 2010 Central Administration site by navigating to Start –> All Programs –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Central Administration.
  2. Select Manage web applications link from the Application Management group.
  3. Select the web application you are planning to configure Object Cache. In my environment, for this demo, I’m selecting SharePoint – 80 web application.
  4. Click the User Policy from the Policy group in the ribbon.
  5. Click Add Users link in the Policy for Web Application dialog box.
  6. Select (All Zones) for the Select the Zone field in the Add Users dialog box and click Next > button.
  7. Enter the Portal Super User account for the Choose Users field and select Full Control from the Choose Permissions section and click Finish. In my demo, I have configured SP_ObjectCacheUser as the Portal Super User.
  8. Click Add Users link again in the Policy for Web Application dialog box.
  9. Select (All Zones) for the Select the Zone field in the Add Users dialog box and click Next > button.
  10. Enter the Portal Super Reader account for the Choose Users field and select Full Read from the Choose Permissions section and click Finish. In my demo, I have configured SP_ObjectCacheReader as the Portal Super Read.
  11. Policy for Web Application dialog box now will look following.

Task 3 – Committing configuration changes using PowerShell

Final step is to commit configuration changes using PowerShell.

  1. Fire up SharePoint 2010 Management Shell by navigating to Start –> All Programs –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Management Shell.
  2. Enter the following PowerShell commands to update the settings. Change the Web Application name placeholder depending on the name of the Web Application.$wa = Get-SPWebApplication – Identity “SharePoint – 80
    $wa.Properties[“portalsuperuseraccount”] = “CONTOSO\SP_ObjectCacheUser
    $wa.Properties[“portalsuperreaderaccount”] = “CONTOSO\SP_ObjectCacheReader


Now you will not see the earlier Critical error in your server Event Log as well as you will experience a reduced latency and an improved throughput.