Friday, 25 February 2011

Time saver : Host file short cut

In this world of SharePoint I often find myself having to alter hostfiles to enusre that traffic is routed correctly. So normally i either browse to or type in:


I found out the other day that you can just type in "drivers" into the run box and it will take you staight to the drivers folder.

This will actually save me time so thought I would share.Te

Sunday, 20 February 2011

SharePoint 2010 Administration Roles

In SharePoint 2010 the general approach has been to make administration permissions more granular then in SharePoint 2007 so that the overall security model is more flexible.

Farm administration
  • Farm administrators are able to perform administrative tasks on the farm (conduct tasks is central administration).
    They are able to assign administrators to Service applications. This implies that farm administrators don't necessarily have to administer service applications.
  • They don't have access to site content by default.
  • Farm administrators are not able to run powershell unless give then SharePoint_Shell_Access role.
Aside : Local administrators on the server can do all farm admin features and more.

Service administration
  • Service application administration also adheres to the concept of granularity.
  • All service applications can have specific administrators assigned by a farm administrator. So the search service application for example would have its own administrator who is not necessarily a farm administrator.
  • This provides flexibility so that different service applications can be administered by different people / groups.
Feature administration
  • This is a new concept which allows specific users / ground to administer a sub set of services application settings.
  • Feature administrators are effectively allowed to administer specific features within a service application. An example would be administering 'Audience settings' within the User profile service application.
Tenant administration
  • Tenancy is a new concept for 2010 and the administrator model has changed to support this.
  • Tenancy allows service applications to be separated depending on tenant. For instance the same search service application can be shared across multiple tenants.
  • Tenant administrators can administer some service application settings  which are specific to their tenancy.
  • In addition tenant administrators are also able to create site collections.
So the key take away is...... Its more flexible in 2010 then it ever was in MOSS.

Thursday, 17 February 2011

SharePoint 2010 : Cannot complete this action as the Secure Store Shared Service is not responding. Please contact your administrator.

A classic story from the front lines here. I created a new Secure Store Service application successfully. When I went to manage it however I received the following error:

Cannot complete this action as the Secure Store Shared Service is not responding. Please contact your administrator.

Hmmmmm I then thought to check the list of services on the server (Application management -> Manage Services on Server) and ensure that the service is running. It wasn't so I enabled the Secure Store Service. I thought I was on the money at this stage. Unfortunatley I still had the same problem.

So to the sharepoint logs. Here I found and entry :

Unexpected Error occured while managing Secure Store Application : There are no addresses available for this application.

This didnt really help me that much. Due to boredom I thought I would try an IISReset.

Guess what?

Problem solved. Note to self. IISReset will always solve ALL of your problems.

Monday, 14 February 2011

SharePoint 2010 Concepts : Remote BLOB Storage

Remote BLOB storrage allows storage of binary data separate from its metadata. So a video file for example can be stored separately from the information describing the file.
  • The metadata is still stored in a SharePoint database. The binary file is stored on the database server fileserver.
  • This allows for content data bases to grow beyond best practice limits.
  • Available with SharePoint 2010 and SQL Server 2008 R2.

Thursday, 10 February 2011

SharePoint 2010 Development Session 2 : Visual studio 2010 + the Sandbox

So here are some more notes I made after a second session learning about SharePoint 2010 development.  Do with them as you wish.

VS 2010 Installation

  • SharePoint Visual studio 2010 developer tools are only for SharePoint 2010. The tools are built in to VS 2010 so there is nothing extra to down load and install once you have VS installed.
  • There has to be SharePoint 2010 on the developer machine to do develop properly.
  • VS 2010  with 2010 first glance benefits over MOSS and VS 2008
  • The tools have been designed to cut down on a lot of the "wire up" procedures which where required in SharePoint 2007.
  • A SharePoint explorer view has been added to allow browsing of SharePoint assets. This is available from Server explorer. You then have read access to SharePoint files.
  • Most SharePoint development will start with a "Blank SharePoint project template". Which will then allow you to add all SharePoint artefacts as required.
  • When adding features all the wire up is automatic. All the files required for a feature are created without the need to connect them together. Feature properties can be set easily through VS designer. This includes the name / scope / feature image url / and more. Its really is easy compared with MOSS.
  • There are short cuts in solution explorer to allow you to add files to the rootfiles ( _layouts / _images / etc). This easily allows you to add files to the file system when needed. There is no configuring of XML required to tell the file where to go. Great!
  • If you want to add an event receiver to a feature this is simple with a right click. The wire up is automatic and you are up and running quickly.
Deployment / debugging
  • Everything is automatically packaged up into a .wsp file. This means that deployment of all changes is easy.
  • F5 now allows debugging without attaching to process as was required in 2007 . When f5 is pressed the code is compiled, a solution package is created and deployed to the development server and full debugging mode is entered.
  • It is possible to configure build patterns which allow you to specify whether to recycle IIS after deployment as well as a load of other options.
Web parts

Visual web parts allows you to create a web part containing and a user control. Similar to approaches in 2007 development but VS wires it all up nicely for you through the graphical designer.
Visual studio is extendible
There are extensions which are displayed under extension manager. Recommended extensions (from MSDN or Visual studio):
  1. CKS - Development tools edition
  2. VS 2010 SharePoint Power tools - Visual web part to sandbox. Aids sandbox installation.
Disposing of SharePoint objects

As we know it is important to dispose of SharePoint objects correctly or the whole farm can grind to a halt. A great tool for checking this is SPDiposeCheck / SPDisposeCheckStatic. The static version is a plug in for VS 2010 which can check that objects are disposed correctly.

Sandbox solutions
  • Sandbox solutions allow development to take place in a safe environment known as a “Sandbox” The idea is that code which runs in the sandbox will not be able to do any serious damage to the running of the rest of the farm.
  • There are limitations on what a developer can do in the sandbox. There is a subset of the object model available to make sure that developers cant cause any harm.
  • Solutions are deployed at site collection level to a solution gallery. This task can be done by a site collection administrator so there is no need for farm administrators to get involved.
  • In VS if you have selected "Sandbox solution" the intelisense will attempt to hide code not available in sandbox. Ultimately however there is no difference in the compiled code. It follows that a .wsp file is not targeted at a farm level or at sandbox level. There is no difference in the wsp. It is restricted by where the code is to run (either in the sandbox or not).
  • Sandbox solutions can be banned from a farm by a farm admin if deemed to be dodgy.
  • Visual web parts dont work in sandbox because of ascx deployment to the file system but the Power tools do have a way around this (see power tools extension mentioned above.
Things you cant do in the sandbox:
  1. Modify file system
  2. Access external sources (web services / databases etc) (although Sandbox proxy service can allow external access calls if really needed).
Things you can do in the sandbox:
  1. Create Webparts
  2. Create Lists
  3. Create List templates
  4. Create custom UI actions
  5. Create some work flows
  6. .... More YES
Solution execution
  • Sandbox solutions don't have to run on the wfe they can run on another backend server.
  • WFE will wait until the sandbox code has run and completed. There is a hard limit of 60 secs for this.
  • The code runs under SPUCWorkerProcess process/.
WSP files (an aside really)
"Save as template" now saves as WSP file in the solution gallery. This can be opened in SharePoint designer. Sounds cool! From here you can customise the lists which are in there and so forth. Very flexible. Great for modifying site templates.

So that is my second quick session with 2010 development. Sorry its a bit notey but I doubt anyone will ever actually read it so it doesnt matter too much haha.
Bring on that SharePoint Farm


Wednesday, 9 February 2011

SharePoint 2010 Development Session 1 : Introduction

Despite being hands on with SharePoint 2010 during the beta version, I haven't had much exposure to developing in 2010. Obviously there has been information release which I have read but I havent got my hands dirty in a while. When I was offer then chance to sit in on some SharePoint 2010 Dev training I jumped at the chance. This post relates to the first session which gives you an intro to development in SP2010. These are my notes but you are welcome to read them.

SharePoint 2010 Developer introduction

A developer training virtual machine is available for free at
The following links are usefule sites relating to the development community. 
SharePoint 2010 Development Stack
  • Development can be done on client operating system.Don't have to develop on the server.
  • 64 bit windows server 2008 for production (Windows 7 possible for local)
  • .net 3.5 (Not .net 4.0)
General points relating to SP2010
  • There is a client object model for silver light and JavaScript
  • Can share service applications across farms.
  • SharePoint designer will help you connect to BCS as opposed to old school XML files
  • Claims based authentication allows you to authenticate against other providers. Eg Google / face book and so on.
New User Interface
  • Contains the ribbon which is inline with existing office version.
  • The page editing tools have given more power via the UI. It is possible to change the layout, insert a picture and format text, insert web parts more easily.
  • List management is improved. A user can select item and edit without post back due to AJAX functionality.
  • List management also allows selection of multiple items in a list and act on them as a group. Previously the only way to group list items by selection was via manage content and structure. This method only allowed administrators to perform certain tasks.
  • Essentially the interface is more user friendly.
SharePoint Dev Terminology review (Object model) 
  1. SPFarm - Farm object
  2. SPWebApplication - Web application
  3. SPSite - Site collection
  4. SPWeb - Site / Sub site
  5. SPList / SPDocumentLibrary - List or document library
  6. SPItem / SPFile - Item or document library
SharePoint 2010 Development Tools
Introduction to Visual Studio platform
  • When adding references it is possible to configure Visual Studio to have a tab to allow you to select SharePoint assemblies without browsing the 14 hive.
  • If you receive an error saying file not found when you run code, it is likely that the assembly is not compiled in 64 bit.. You must change the build to be 64 bit in VS there will be an error.
SharePoint designer 2010
  • SPD can be started from site actions menu.
  • When opening a site the a "Site object" browser is available which allows viewing of Content types / external content types / lists/ master pages / workflow / groups sub sites / all files (and more).
  • Can see permissions of objects directly via summary screen so can update permissions this way through SharePoint designer.
  • Summary pages shows other information including list id and other relation ships / forms views / etc
  • Makes it easier to use
  • The are options to copy and modify the SharePoint workflows. This includes out of the box workflows like approval.
  • Can have site workflow to apply to whole site. So can upload lots of files and process as one group.
  • Workflow designer is improved and is not in wizard form (although some of the pop ups are the same).
  • Site work flows available from the all site content screen
  • Preference is PowerShell over Stsadm.
  • Cmdlets are used to provide functionality and to do administrative tasks
  • Pipe lining and formatting allows output to be filtered and formatted in a particular way. This can be piped to file.
  • To run .ps1 files execution policy will need to be set. There are 3 levels  Restricted / unrestricted / bypass.
  • All dos commands are available as well as others.
  • "Tab" key allows command completion
  • "Integrated Scripting environment" will help you come up with power shell commands and writing code. Intelisense and debugging is available in this environment. (Need to add SharePoint commands to load SharePoint snap in for your profile).
  • Add ps snap in to the Micrsoft.SharePoint.PowerShell to allow SharePoint to access SP commands.
  • Help is there "Get-help"
  • Can write powershell snap its which are like stsadm extensions. (Gary lapoint is still doing it at
SharePoint 2010 Ribbon and UI
  • Ribbon control development is the same as for office except for the "Ribbon gallery control".
  • Alerting the user can be doing by status (at the top of the page) / page notifications (pop up in to right hand corner of the page..You can write to these as a developer. They don't require postbacks.
  • In place editing allows users to edit in place without doing postbacks. Highlight and edit. (There seems to be a lot of focus on not doing postbacks so bare this in mind when implementing modifications).
SharePoint 2010 Dialogs
Modal Dialog pop ups are available through JavaScript calls which are great for replacing traditional "pop up alerts".
Var dialog = {url : "", title: "hello", width: 400, height: 400};
Sp.UI.Notify.addNotification to add the notification

Custom actions

These allow you to add extra actions to various parts of the interface. This includes the ribbon.
Actions can be added directly through SharePoint designer making it much easier than 2010.

  1. Create a new view for a list in SharePoint designer.
  2. Add a custom action to the ribbon so that there is a quick way to get to the list view.
Other points
  • All sites now have pages and page libraries.
  • Sites contain the following Master pages( V4.master, Minimal.master, Simple.master, Default.master)
  • SharePoint now contains Well formed XHTML (cant believe this is advertised as a selling point - but hey at least we are finally here)
  • SharePoint Cross browser IE Firefox and CHROME
  • WCAG 2.0 AA supported OOTB
  • Rich text editor supports XHTML
So there we have an introduction to SharePoint development in note form.

Wednesday, 2 February 2011

"Access denied" to Site Collection administrator

This post is to remind me of something which is a "school boy error" in my world of SharePoint. I had been handed a farm which was in a mess and I was attempting to get it up and running. One of the problems I had was I kept getting "Access denied".
  • I got access denied when I accessed that root of the site. http://site/
  • I got access denied when I accessed the settings page http://site/_layouts/settings.aspx
  • I got access denied when I tried to modify any file in SharePoint designer. 
I was defiantly a site collection administrator.
Then the sun started to shine. It turns out that the site collection had been locked when I checked in "Site collection Quotas and Locks". Now why didn't I think of this sooner. I should have known better.