Wednesday, 28 March 2012

Deploying Code on Shared SharePoint Infrastructure

Problem: How do you deploy code onto your SharePoint Production farm for Enterprises. 

Initial Hypothesis: There are various options for deploying solutions on SP2010.  The stricter you are the better the farm will cope with multiple additional coded solutions.  Layout clear guidelines on:
GAC vs Bin vs Sandboxes
Scoping - minimal scoping
Upgrades - how do you upgrade, use wsp, number dll's, upgrade wsps,.
Backup and restoring site templates and moving data.  The farm you are moving a backed up Site collection to needs to be newer than the source SP version.
Customisation - do you try OOTB, are your designs vetted by an architect, SPD, InfoPath, 3rd party web parts/templates.

Use test, QA and production environment and update each env using the same steps/documentation.  Consider AvePoint Migration Manager (need to review this) for deploying InfoPath, assets including wsp's and code.
Ensure all architects and developers know the developer Standards for the SP2010 farm.  This should include how to deploy code, as a general rule make everything need to be deploy-able via PowerShell scripts, it's safer and can be retracted.  Developer standards need to mention; what SP features (MMS, UPS, Excel Services, ect.) can be used and what tools such as InfoPath and SPD are allowed, how are these changes synchronised between your environments/farms.  Should customisation be packaged in wsp's?  It takes time but could mean a more stable farm.  Should also cover when to code, ensuring code such as elevate privileges is used correctly, the list goes on and is a mixture of SP best practises and implementing them pragmatically for you business.

PS to deploy wsp's

Tools to look at are:
  1. ROSS from RepliWeb (Attunity) &
  2. Avepoint (Deployment Manager) has a module for deploying between environments.

Saturday, 24 March 2012

Turning on the Windows 2008 R2 Desktop Experience

Problem: A standalone developer VM generally means that the developer needs to use the browser on the Windows 2008 Server to check features are working in SharePoint.  On such problem with working on the Windows 2008 desktop you can't open a document library in Windows Explorer.
Error Message: "Your client does not support opening this list with Windows Explorer.".
Your client does not support opening this list with Windows Explorer
Initial Hypothesis:
Turn on the Windows Desktop Experience feature.
Windows feature - turn on 'Desktop Experience'
Run the following 2 PS cmds as administrator:
PS> Import-Module Servermanager

PS> Add-WindowsFeature Desktop-Experience -restart

Note: I only apply this to me development machines.

The Desktop Experience also fixes using Office on the Dev VM.
Useful PS cmds in this area:
# Import-Module Servermanager

# Get-WindowsFeature
# See what Windows features is installed
# Add-WindowsFeature Desktop-Experience -restart
# Remove-WindowsFeature Desktop-Experience -restart

Friday, 16 March 2012

Fiddler Tip - view https traffic

Problem:Need to see https traffic between the browser or any client application and the web server.

Inital Hypothesis:  Use fiddelr to trust the sites public certificate so that https traffic can be monitored.

Resolution:  Open Fiddler
Tools >Fiddler options > Https > Decrypt https traffic.  Accept the popups.

Updated 2017-06-02: Screens have changed slightly.

Thursday, 8 March 2012

Setting up User Profiles Reminder

Problem:  Over the last few years I have to re-setup user profiles fairly often and each time I try do it from memory and it fails.  Once again tonight I messed it up on the 1st run.

This Technet article on UPS is key follow the steps:
Good simple video on setting up the AD connection and synchronising the UPS

More Info:

PowerShell to determine NetBios/Hostname and FQDN on the local machine:
PS> $obj_IPProperties = [System.Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties()
PS> "FQDN: {0}.{1}" -f $obj_IPProperties.HostName, $objIPProperties.DomainName
PS> $obj_Computer = Get-WmiObject -Class Win32_ComputerSystem
PS> "NetBios: {0}" -f $obj_Computer.Name

J Curves with SharePoint implementations

When speaking to a client or prospecive customer, everyone wants to hear how SharePoint will solve all you problems and IT will live in Utopia for the next 10 years.  Obviously there is a lot of work and planning to get improved performance never mind an ideal scenario.

In the past I try tell the client how it will get worse before it get's better (the dreaded J-curve).  Robert Bogue has put this down nicely.  Post the sales patter definitely worth addressing as early as possible.

Sunday, 4 March 2012

Office document in SP2010 won't open - Explorer fails, SDP fails.

Problem: Can't open Office documents (Word, Excel or PowerPoint).  Additionally can't connect to SharePoint using SPD2010 or Publish forms using InfoPath 2010.  Another effect has been that Windows Explorer won't display document library's.
Initial Hypothesis:  A colleague of mine Grzegorz Skorupa in Poznan figured out the issue using Fiddler.  Our site was running over SSL so he had to decrypt the response's and requests using Fiddler.  Fiddler was also used to intercept the requests from the Office client program.  From this he could see MS Word issuing more than simply GET and POST verbs.  Recently our SharePoint test environment had been hardened which include only allowing GET & POST verbs.  This also only occurs if you are using STSsession cookies.  This was previously discussed

You can check your farms cookies session setting using the following PowerShell cmd:
PS> Get-SPSecurityTokenServiceConfig

As it has been explained to me, because the session cookies are being used, the cookies are no longer written to disk, so the Office application needs to authenticate (as it can't use the cookie created by the SharePoint browser session). The Office client uses WebDAV request, has to authenticate and it passes requests that are not GET or POST based to retrieve the file.

Resolution:  Check IIS and the instances of IIS are allowing all verbs in request filtering or use the default sessioncookies setting (false).
$sts = Get-SPSecurityTokenServiceConfig
$sts.UseSessionCookies = $false

You can watch the http request types (request verbs) using Fiddler as highlighted below.

SPO 2nd update Statement

SPO made it's 1st update statement in October 2011 which allows BCS (web services) on SharePoint Online.  This is the 2nd change to the SP2010 online version (Feb 2012),
Ability to scale up to 500K users was 20k.
Site Collection Recycle Bin - ability to self restore includes a full site collection restore.
Ability to invite non-domain users  - Simplifies Collaboration with partners, customers, etc as they can use their own email adrs.
Changes to how your browser handles to PDF files - use to have to download and then open the pdf document.  Now will open pdf reader once clicked.