Thursday 12 June 2014

Migration test of Sharegate to SP2013

Problem: I am looking at migrating some basic content into an SP2013 farm from SP2010.  I would normally opt for Metalogix or DocPoint if the client already has the licences but today I needed to use another tool namely Sharegate.  I used Sharegate.Migration.4.6.3

Scenarios:
SP2010 blog posts to an existing SP2013 blog.
SP2010 lists into SP2013.

Screenshot of the tool:


Verdict:  A great tool, easy to use, mapped over data cleanly.  Absolute winner! 

Updated: 2018/10/23
I also like Metalogix but Sharegate is still a brilliant tool for SharePoint data migration.

Wednesday 11 June 2014

CAML Designer for SharePoint 2013 is Brilliant

I always used U2U for checking my CAML queries in SharePoint.  I have just used CAML Designer for SharePoint 2013 and it is brilliant.

Link to the CAML Designer tool
http://karinebosch.wordpress.com/2012/12/13/caml-designer-for-sharepoint-2013-released/

Simple Example of using CAML to query a list:
string riskListCAMLQry  = "<Query><Where><Eq><FieldRef Name='Status' /><Value Type='Text'>Scheduled</Value></Eq></Where><View><RowLimit>1000</RowLimit></View></Query>"

Call using C# CSOM
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = riskListCAMLQry;  
// Add a where clause on the status on the list to restrict the result set, only return the first 1000 rows

Saturday 7 June 2014

Content database Sizing & Cleanup

Problem:  At a customer site, a content database is massive.  Various Site collections are using the same content database. 

Initial Hypothesis:  Smaller site collections can be moved to new separate content databases.  This reduces the size to some degree.  The SQL log (ldf) is in good shape.  The excessive size is due to 3 unavoidable issues, multiple versions of large blobs (we need the versioning so not an option).  The recycle bin is set to the default 50% and my dumping older content is brings down the size and lastly, delete content databases are still sored within SQL. 

Resolution: Remove the previously deleted site collections fro the content database.   Using CA, I tried to run the "Gradual Site Delete timer job", it no difference, the delete site was still lingering about. 

Used PowerShell to remove the deleted site collections as shown above.  E.g. PS> Remove-SPDeletedSite -Identity ""

More Info:
http://blogbaris.blogspot.co.uk/2013/01/delete-sharepoint-2010-site-collection.html
 

Wednesday 4 June 2014

SharePoint 2013 urls

I am often having to go to Google to find SP url formations, to work with the product as I don't memorise them.  Ahmed Farag has a good post on this:
"Famous SharePoint URLs & Locations"

My common ones are:
Login using Windows credentials
/_windows/default.aspx
Web Part Maintenance Page
?Contents=1
Sign in as a different user
/_layouts/closeConnection.aspx?loginasanotheruser=true
Change Site Master Page
/_layouts/ChangeSiteMasterPage.aspx
Master Pages library
/_catalogs/masterpage/Forms/AllItems.aspx
User Information list per Site Collection
/_catalogs/users/simple.aspx 
/_catalogs/users/detail.aspx  (also see)
/_layouts/userdisp.aspx?id={UserID}&Force=True
List all users whi have accessed the Site collection
/_layouts/15/people.aspx?MembershipGroupId=0
Get the custom property bag propeties on the Root SPWeb of the site collection
/_api/web/allproperties
Get the version of the SharePoint server (Patch level)
 /_vti_pvt/Service.cnf
SharePoint Workbench for SPFx
/_layouts/15/workbench.aspx

Also see:
http://blogs.msdn.com/b/how24/archive/2013/05/23/famous-sharepoint-urls-amp-locations.aspx

Tuesday 3 June 2014

SharePoint 2013 publishing site blog won't allow anonymous access

Problem:  I have a public facing website that has a blog.  I have been hitting my head trying to make it anonymous when eureka Google saved me on a topic I had totally forgotten. 

Initial Hypothesis: I have anonymous access enabled on the web application and on the site collection.  I started thinking it was the blog not inheriting permissions so I tried applying anonymous access at the site level followed by examining permissions on the posts list.  All erroneous so I reverted to full inherited permissions.  I Google-ed the symptoms and viola, it is the ViewFormPagesLockDown feature.

Resolution: Turn off the ViewFormPagesLockDown feature for the site collection and anonymous access users will not get the credential prompt when accessing the post.
PS> $lockdown = Get-SPFeature viewformpageslockdown
PS> Disable-SPFeature $lockdown -url http://sitecollectionURL
and confirm the change.

More Info:
http://blogs.msdn.com/b/varun_malhotra/archive/2012/01/13/can-t-access-a-list-on-an-anonymous-site-sharepoint-2010.aspx
http://blog.mastykarz.nl/preventing-authenticated-visitors-browsing-system-pages/ (Important)

Anonymous REST JS call error using SP2013

Problem: I am making an anonymous JavaScript REST call to a image library.  I get the error "Request failed.  The method GetItems of the type List with id ... is blocked by the administrator on the server.nundefined".
 
Resolution:  Change the ClientCallbackSettings on the web application as shown below.
 
 

$wa = Get-SPWebApplication http://www.demo.dev
$wa.ClientCallableSettings .AnonymousRestrictedTypes.Remove([microsoft.sharepoint.splist],"GetItems")
$wa.Update()


More Info:
http://www.sharepoint-zone.com/search/label/ClientCallableSettings.AnonymousRestrictedTypes
 

Saturday 31 May 2014

Content Type Hubs - Thoughts on running Global Content Types for an Enterprise - Part 1

Rough Notes - Publish once cleaned up

Problem: Content Types are a misunderstood and often underutilised set of functionality for syndicating metadata.  Management of the syndication's and ramifications of decisions often lead to unpleasant scenarios.

Notes:  Not a lot has changed between SP2010 and SP2013.

General if you need to reuse a content type in more than 1 site collection it is a good candidate to go into the content type hub.

It is a good idea to ensure that each DTAP environment has identical Content Types in the Content Type Hub.  Concept Search has a product that synchronises Content type across env.  So changes made in production can be pushed to pre-production and then onto your UAT environment.  Writing code to do this is fairly simple.

Concept Search is a third party solution designed to auto-classify content that’s dependent on metadata in the MMS Term Stores.

If is a good idea to have a service owner for Content Type across the enterprise, as this role is very closely related to the Taxonomy/Term store, it is a good idea for this service owner to manage both of the MMS relevant functions. 

A good break down is to work out what the required columns on all data is and this improves search considerable.  For example all document should have a country.  This could be a Term Set with Global, regions (e.g. EMIA), countries (e.g. United Kingdom) and provinces/states (e.g. )  allow each document to be tagged to a country.

I like to group Global Content Types into 2 or 3 layer namely (Enterprise CT's, Division Specific CT's and application specific CT's).  The CT's created in any of these layers inherit from the layer above.  For example, all our documents have an additional field country that applies to all documents (Enterprise global CT), at a division Marketing (A marketing medium media e.g. Newspaper) is appended.  Lastly in our contrived example we have built a specific application for tracking our marketing and this would add the fields (product Type, Audience age range) shall be added.  This allows for consistent tagging/metadata of data within an enterprise.

A good example of search working with meta data is not on the enterprise search you can add a filter on country and allow folks to easily filter down to country specific documents quickly.

How it works:
  • Site Collections can subscribe to CT in the CTH
  • CTH is a site collection
  • Site Collection consume the CT's in the CTH
MMS Term Groups are closely related to the Content Type Hub: