CKS Development Tool kit for VS 2012 is Available


If you are a SharePoint developer, you must be knowing about the CKS dev tool which helps developers to deploy solutions. No controversy on this fact that this is top most tool to be used for creating SharePoint solutions with Visual Studio. It is really good news for all those who has been egregiously waiting for next release of CKS Tool competible with SharePoint 2013 and VS 2012. Most of the people are using Mavention Quick Deploy in absence of CKS.

Guys, the moon is not so far from you to touch, have a look on CKS: Development Tools Edition and download this tool and enjoy the easy deployments and upgrades. Once you install this tool you just need to right click on the SharePoint solution and you will get following options:


The modification from the earlier versions:

  • Improvements to Quick Deploy – Performance improvements phase one and some minor defect fixes in GACUtil calls.
  • Existing VS2010 SPI Providers – Projects with existing CKSDev SPIs now supported.
  • SharePoint 2010 Console project template – Project template for a SharePoint 2010 console application.
  • SharePoint 2013 Console project template – Project template for a SharePoint 2013 console application.

Happy SharePointing 🙂

Change Favicon for SP 2013

Hi guys,

Favicon, Sometimes user come across some websites which shows logo instead of explorer logo in Address bar. A typical example is Google, login to Google with IE and watch address bar. You can see Google logo then the URL. This icon is stored in the PC when we add the sites as bookmarks. When you open bookmarks menu the site name will show with the icon.

SharePoint 2013 comes with a blue Favicon FAVICON and it’s resides in SharePoint Root Folder\Template\Images [C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\IMAGES\].

Create your own Favicon?
It’s very simple to create favicon. All you need is the company logo or image(in JPG/PNG/GIF format) which you want to create based on and internet connection. Open browser and enter . Then click Choose File Button and select your image. Click Create Icon Button. Now the site will create favicon based on image given and it’s ready to download. Download and save it in your PC.

How to set Favicon site?

There are two possible ways to set the favicon:

1) (Not Recommended)Change the default SharePoint Favicon:

Open this folder(C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\IMAGES\) and search for favicon.ico and rename the file to FaviconBackup.ico. Now copy your favicon to this folder and make sure it’s named as “favicon.ico”. Now restart IIS(open Command Prompt -> IISReset), clear browser cache/temporary internet files. Close the browser and reopen then browse the SharePoint site.

2) In SharePoint Designer or any other editing tool open your site Master Pages or if you are using default oslo.master, then select the master page that will show the new favicon. Now click “Edit File” link to add the favicon code. If it asks for check out, click yes and continue.
Find <SharePoint:SPShortcutIcon ID=”SPShortcutIcon1″ runat=”server” IconUrl=”/_layouts/images/favicon.ico”/>and change the name of the favicon. Save and close (If you have checked out then you need to check in and site collection administrator has to approve it via Site Settings -> Galleries -> Master pages and page layouts -> Check in and Approve). Now reset IIS/clear browser cache and check.

Cheers !!

Error: Cannot uninstall Language Pack 0 because it is not deployed when attempting to uninstall-spsolution on sharepoint foundation


While doing deployment on servers, I was encountered with the error “Update-SPSolution : Cannot uninstall the LanguagePack 0 because it is not deployed.” In order to solve this issue do the following steps:

Find the exact cause: Check the farm solutions by navigating Central Administration >System Settings > Manage farm solutions and you must see error in front of your solution name. There may be multiple reasons why this error came. Error description might help you to find the exact solution. In my case it was saying access denied to few files. I removed the “Read only” attribute from those files.

Resolution: Uninstall/Remove the solution using “Uninstall-SPSolution -Identity <wsp solution file name>”.

Next Add solution again using: “Add-SPSolution -Identity <wsp solution file name>”.

Now intall it again using :”Install-SPSolution -Identity <wsp solution file name> -GACDeployment -Force”.

In case, you get any error doing above steps then last option is go to services.msc stop and restart the SharePoint Timer service and the SharePoint Administration service.

Then run the power shell command again. this time the WSP got updated.

Happy SharePointing :)!!!

Enable session state in SharePoint


I was trying to use the Session[“key“] code in SharePoint. I got the following exception: “Session state can only be used when enableSessionState is set to true, either……………..”.

After facing this error, I found that by Default the Session State is Disabled in SharePoint. If you look at the Web.Config the you will see that as below.

<pages enableSessionState="false"

You can enable it there. Else you can Enable this at the Page Level. But I recommend you being a SharePoint guy you must rely upon the SharePoint Power shell command:

“Enable-SPSessionStateService –DefaultProvision”

It should not be necessary to edit the web.config file after running Enable-SPSessionStateService. Additional information about enabling session state:

Syntax 1 Syntax 2
-DatabaseName <String>
[-DatabaseServer <String>]
[-DatabaseCredentials <PSCredential>]

Additional parameters are not discussed here; use Get-Help Enable-SPSessionStateService –full for more information.

The Enable-SPSessionStateService cmdlet creates a session state database, installs the ASP.NET session state schema, and updates the Web.config files on the farm to turn on the session state service.

If the DefaultProvision form of the command is used, all default settings are used. These are:

  • DatabaseName = “SessionStateService_<GUID>”
  • DatabaseServer = the same database server as the SharePoint 2010 configuration database
  • DatabaseCredentials = Integrated Windows Authentication

Happy SharePointing 🙂


Hide Ribbon on SharePoint 2013 using CSS

Hi Guys,

I recently experienced the migration from SharePoint 2010 to 2013. I was earlier hiding Ribbon using the SPSecurityTrimmedControl and CSS. But in SP 2013 MS has divided whole ribbon in two section: s4-ribbonrow and suiteBar

Hiding the ribbon is as much as easier as it was in 2010 version. But here we just need to take care of above two mentioned sections. I have gone thorough some of the blogs where people are saying that we have change the html file(Seattle.html or oslo.html) and design manger will take care of creating master page for you (ref: Hide Ribbon).

But there is another traditional way of doing same, follow the given steps:

1) Open the master page file in the SharePoint designer.

2) Add the style tag to hide the ribbon for all the user:

#s4-ribbonrow, #suiteBar { display : none; }

3) Now we have to do some more changes so that at least system account can access the ribbon. Find out the <div id=”s4-ribbonrow”> tag.

4) Insert the following code inside this div:

<SharePoint:SPSecurityTrimmedControl ID=”SPSecurityTrimmedControl2″ runat=”server” PermissionsString=”AddAndCustomizePages”>

document.getElementById(“s4-ribbonrow”).style.display = “block”;
document.getElementById(“suiteBar”).style.display = “block”;


Note: Make sure before you copy and past above code. If you are getting any formatting errors after adding this code. Kindly delete all double quotes and add them again. 

5) Now save the master page and deploy or publish it to see the changes.

Happy SharePointing 🙂

Jquery: Validate the mobile number field.


Below is the very simple code which is capable to validate the mobile number field on any .net form.

jQuery(document).ready(function () {
jQuery(“#btnChangeNumber”).click(function () {
var mobileNo = jQuery(“#txtNewMobileNumber”).val();
if (mobileNo == “”) {
alert(‘Please enter mobile number.’);
return false;
else {
var rege = /^[0-9\+\-\(\)\s]*$/;
if (!rege.test(mobileNo)) {
alert(‘Please enter valid mobile number.’);
return false;


Enjoy 🙂 !!!!

SharePoint 2013: Object doesn’t support property or method ‘querySelector’


It is unfortunate to share that SharePoint 2013 is not supported by <IE8 browser versions. In case you got this error: “Object doesn’t support property or method ‘querySelector’ ” while loading the site page that means you have to go to new version of browser.

This error encounters because of init.js file under layouts scripts which uses the java script query selector as shown below:


So getting rid of this error is impossible as Microsoft never checked IE7 compatibility while releasing this new version of SharePoint 2013. In case your customers are bound to use this browser then you have to coordinate with Microsoft guy to handle this issue.

I am not sure but there is one another way to get rid of this. Some people have used some tools like sizzle for same.