Friday, July 22, 2016

FireFox and Certificate authentication

When I visit a SharePoint site which is secured with PKI certificate authentication, I usually get certificate selection prompts properly in Internet Explorer and Chrome. Both IE and Chrome are smart enough to show me list of certificates available in my Personal Certificates store.

But when I browse the same PKI secured site in Firefox, I didn't get the certificate selection page and thought of poking around that issue for a solution today. The solution is Firefox is not looking in your personal certificates store. So even though you've imported your certificates to Personal certificates, you should also import them to Firefox certificate store too.

First export you soft key to a folder from your personal certificates.

Open FireFox, navigate to Tools->Options->Advanced->Certificates->View Certificates

After this setting, you'll be shown a certificate selection dialog box every time you browse a site authenticated with a certificate.

Tuesday, July 19, 2016

Hide a SharePoint ECB menu

 There was a requirement to hide a  menu item in  a  document library. The specific menu item is "Compliance Details".

After poking around JavaScript for sometime and the CSS fix looks elegant because of the CSS selectors.

Add a script editor web part and add the below

<style>[text="Compliance Details"]
 {display: none !important;}

This is actually find all "li" with class "ms-core-menu-item" where the attribute "text" value is "Compliance details" then assign the new style.

CSS selectors allow us to match any menu item by matching them with a display text of the menu.

Wednesday, June 29, 2016

Site Collections Size report

Wanted to quick script to get all site collections size along with their last modified dates, visits. PowerShell is cool enough to do that in two lines.

Get-SPSite -limit All | select url, @{label="Size in MB";Expression={"{0:N2}" -f ($_.Usage.Storage/1000000)}},@{label="ContentDB";Expression={$_.ContentDatabase.Name}},@{label="Visits";Expression={$_.usage.Visits}},@{label="lastmodified";Expression={$_.RootWeb.LastItemModifiedDate}}  | epcsv SiteReport.csv -NoTypeInformation

Thursday, June 23, 2016

Reviving datasheet view in SharePoint 2013 for selective sites

 In SharePoint 2013 the datasheet view is deprecated by Microsoft and Quick edit was promoted. Datasheet view is an ActiveX component which has tight dependency with Internet Explorer and Quick Edit is based on HTML 5, CSS and JS achieving cross platform and cross browser compatibility.
                Datasheet view in legacy platform is ideal for doing bulk row edits and inserts without facing performance issues with few caveats.

How Data Sheet view works?

Datasheet view is an ActiveX component called ListNet from STSList.Dll which accept the below parameters to work properly
  • ListName
  • ViewGuid
  • RootFolder
  • ListWeb
  • ListData
  • ViewSchema
  • ListSchema

Pros and Cons


  •  Users will get the legacy control to work in the same fashion without the need of exporting to excel.


  • Document Center is not supported.
  • Managed metadata is not supported.
  • Cross browser and Cross platform incompatible.

Wednesday, July 2, 2014

SharePoint grayed out Multiple file uploader option

After upgrading to Internet Explorer 11 and Office 2013, while trying to do multiple file upload to a SharePoint document library, it was grayed out.

I've ensured the STSUPLD control in Addons menu, verified the 32 bit version of Internet explorer is loading the site. But still there is no luck and also i'm unable to access the Datasheet view of the document library or a list.

The trick is to un-check the "ActiveX Filtering" option from Tools menu. Additional browser security...

Thursday, March 14, 2013

Deploy SharePoint solutions at web application level

SharePoint solution packages by default get installed to "Globally" scope when you don't have any resources which are web application scoped. It is not a logical decision to deploy in web application scope when I have Assemblies to GAC, Application pages to Layouts folder etc. If there are any resources which are targeted at web application scope like deploying assemblies at Application bin directory, safe control entry etc then the solution deployment will force us to deploy at web application level.

Some times you will have assemblies to GAC, not a web part project and don't have any resources which are scoped against web application. At this juncture, you may need to deploy the solution at web application scope for various reasons like

  • Security  - To hide features part of the solution from showing off in other web applications.
  • Shared Environment - Other applications running in the Farm and they don't to get impacted of your WSP
  • Isolation - Having a global scoped WSP will recycle all app pools during deployment
This can be achieved by adding a safe control entry to the solution package and solution deployment script will be satisfied by this. If it is MOSS 2007 then its matter of Manifest.xml modification. But SharePoint 2010 is powered with Visual Studio 2010 tools for SharePoint, if we make any modification to Manifest.xml then the Package designer will ignore its support to the developer.

The solution would be, open your package designer, scroll down and find the Advanced Tab, click on "Add" button to add additional assemblies.

Select "Add assembly from project output", input the namespace and full assembly name for the safe controls.

Save these settings and hit on Ok button,one more setting to update. Click on the project in solution explorer and press F4 to open the properties window, exclude the assembly from being copied to solution package.Because we already added the assembly in "Additional Assembly" section.

Package and deploy the solution at web application level scope.

Thursday, February 14, 2013

Portable mail server on desktop for SharePoint

I used to run an SMTP server which comes along with IIS 6.0 whenever I need to test an outgoing emails from a custom SharePoint solution. After a long time I hate running a server process just to receive a bunch of emails relayed within my development machine and also due to compliance, network administrators may block the SMTP server in a desktop.

Here comes a nifty tool from Codeplex called Papercut for all our problems. Ok, how to resolve the SMTP puzzle ?

  1. Download Papercut from CodePlex, unzip the zip package (Note: there is no msi package or a setup.exe, so you are not violating software compliance too) and keep it in a handy location
  2. Find your machine IP first by using ipconfig and make a note.
  3. Map your IP to SharePoint’s outgoing mail settings in SharePoint Central Administration console.

Open PaperCut.exe -> click on “Options” -> Map your machine IP here. Keep it open and running, do not close.

Now test all your email functionalities and you should be seeing all emails in the left pane with time stamp.

Watch all your mails are being forwarded to Papercut.exe.