Thursday, November 28, 2013

Some very useful powershell commands

Mobile carousel image viewer



I have used the html script from below blog for mobile carousel control, this is a great control, thanks to Matteo Spinelli who has done a great job providing such a useful control in as little code as possible. It users css styles for image transitions which is very efficient in browser.
HOW TO

DEMO

It was requirement of the project to use this control for horizontal swapping, which unfortunately seems to be having few issues, therefore I have modified the cardview.js file to work a little smoother in horizontal swapping mode. The complete code can be found here.

SharePoint 2010 uncustomize a page layout

 To uncustomize a page layout or master page,

2) Using powershell script: http://admin-sharepoint.blogspot.co.uk/2013/05/unghosting-customized-page-layouts-with.html

3) Using SharePoint Designer: http://mosshowto.blogspot.co.uk/2008/10/re-ghost-master-pages-sharepoint.html

4) Using stsadm: http://blog.ithinksharepoint.com/2011/05/10/issue-with-updating-sharepoint-publishing-page-layouts-and-ghosting/

5) Using site settings, though this works for a normal site page, I am not sure if will works for a page layout or a master page: http://rolandoldengarm.wordpress.com/2012/01/23/page-layouts-in-master-page-gallery-not-updated-after-a-deployment/  

6) Free utility: http://www.codeproject.com/Articles/514279/Ghostplusun-ghostedplusSharePointplus2010plusfiles

To disable customization
http://blogs.msdn.com/b/steve_fox/archive/2010/03/08/ghosting-unghosting-in-sharepoint-2010.aspx

other references:
https://www.google.co.uk/search?q=sharepoint+2010+customize+page+layout&oq=sharepoint+2010+uncustomize+p&aqs=chrome.1.69i57j0l5.20326j0j8&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8#es_sm=93&espv=210&q=sharepoint+2010+unghost+page+layout&start=10

Wednesday, November 27, 2013

SharePoint 2010 page layouts versioning

A page layout deployed through visual studio feature automatically updates the underlying page layout file everytime a new deployment is done, however

  1. This change is not reflected in version history, thus there is no way to figure out by just looking at the master pages gallery when was the page layout modified last time. The only way this can be verified is by opening the feature folder under 14 hive and making a note of the last modified date for the page layout file.
  2. The page layout does allow us to manually upload a new version, but EnableSessionState attribute is not allowed in manually uploaded page
  3. If a custom class derived from a PublishingLayoutPage class is used as base class for the page layout then manually uploaded page layout requires it to be registered as a safe control, even though the same template deployed through a feature does not.

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...