Navigation

Wednesday, 7 October 2009

Visual Studio 2010 and TFS connection: "The ServicePointManager does not support proxies with the https scheme."

Using the beta version of Visual Studio 2010, and trying to connect to a Team Foundation Server, you may find that you get the error message:
 
"The ServicePointManager does not support proxies with the https scheme."
 
You'll only get this of course if you are trying to connect using HTTPS / port 443. The workaround seems to be some reg fixes which tell the TFS client to bypass the proxy.
 
Aaron Block's MSDN blog seems to have the answer to this:


Tuesday, 6 October 2009

SharePoint Tabs Made Easy

While browsing EndUserSharePoint found a good post about using a JQuery script embedded into a CEWP.

From my brief look this basically turned every web part on the page into tabs so that you can create VERY quick and easy tabbed dashboard interfaces. Extremely quick, extremely easy ... the best bit is no code, no development.

You can check out the article (and the video) here: http://www.endusersharepoint.com/2009/10/05/yes-believe-it-the-sharepoint-easy-tabs-interface-web-part/



The History of SharePoint

A really nice article posted up by the Microsoft SharePoint Team Blog:

As we are just two weeks away from disclosing SharePoint 2010 at the SharePoint Conference starting October 19th, I wanted to write three posts to provide context on the upcoming release. This first post will cover the history of SharePoint. I hope it will provide some useful perspective behind our vision and what we have learned as well as a few fun anecdotes. The second post will cover the engineering process for SharePoint 2010 - how we design and develop SharePoint in the Office team, what new approaches we have taken during the 2010 development cycle and my take on a few frequent questions I hear from customers and partners. The third post will coincide with the opening of SharePoint Conference and cover the major feature investments. After that, our team will star blogging in depth about the new SharePoint capabilities. For folks who cannot wait, we have highlighted a few of the new features on the SharePoint 2010 Preview Site as commented on several Office 2010 client capabilities including a few points of SharePoint integration on the Office Engineering Blog.

Before we jump in to this post, I want to thank everyone who has been with us on the journey so far and is supporting us in the release of SharePoint 2010 and feedback for releases beyond. While I will talk about the efforts that evolved into SharePoint, its origin dates to around March 1998 when we first started planning the projects that led to SharePoint. Since the first beta of the first release, we have been extremely fortunate to have your support and hear your feedback. It has been extremely rewarding to see all things you are doing with SharePoint. We have posters of many of your sites on the walls of Building 16 on the Microsoft Redmond Campus and these are a source of great motivation and pride for our team to take things to the next level. We always appreciated your ideas and feedback friendly or otherwise about where the product should go or how we could help you better. We think SharePoint 2010 will be another big step forward but we know there is more to be done and are thankful you care enough to keep pushing us. Finally, we want to thank the Microsoft teams around the world who has worked so hard to build and support the product with special thanks to a few dozen people who were with us from the very beginning in 1998. We are very fortunate to have a great team, customers and partners and that is what keeps us fired up to come to work every day.

to read more go to:


Thursday, 1 October 2009

SAS (SharePoint Accessibility Solution) - WCAG 2.0 AAA reusable framework for SharePoint

I am proud to finally announce the official release of SAS (SharePoint Accessibility Solution) by Content and Code.
 
The release of an accessible framework for SharePoint is a massive step for both SharePoint, Content and Code any organisations looking for an accessible SharePoint platform.
 
This framework was used (and developed) for the RNIB Website (which I posted about a few weeks back: RNIB - World's first AAA website launched in SharePoint).

"Accessibility is mandatory for many organisations, allowing access to the web for all. Our SharePoint 2007 Accessibility Framework allows sites to be built rapidly without sacrificing SharePoint functionality."

- Tim Wallis, CEO, Content and Code

By all means check it out and tell me what you think :)

http://www.contentandcode.com/solutions/Pages/accessibility.aspx



Wednesday, 30 September 2009

Performance Optimisation in SharePoint

Performance has always been a bit of a black art in SharePoint, with so many core files being dropped onto landing pages it's not uncommon to have a 500kb payload taking over 10 seconds to load.. of course for most corporate websites this is simply not good enough.
 
When building the RNIB website we spent a lot of time getting the page payload lower, and the caching model tweaked so that the pages were loading more responsively. We were mostly successful but there were plenty of challenges.
 
First off was the ScripResource files (used by Ajax). They were only really used for editing (the rich text editor we used from Telerik). Putting those references into a SharePoint "EditPanel" seemed to sort that one out (so the files were only ever being loaded if the page was in Edit Mode  .. which was never the case for anonymous users.
 
The caching profiles were also a big boon, enabling BLOB caching for the script files and static images, and also tuning the SharePoint site collection cache profiles so that they worked best for anonymous users.
 
We also used a bunch of other 3rd party tools, including the awesome Fiddler2 and YSlow for FireFox.
 
There has also been a very good article recently from the Microsoft SharePoint Team Blog describing how they went about optimising the sharepoint.microsoft.com website. Its a good read and brings up some lesser known optimisation techniques.
 
If you have any tips on performance optimisation I'd love to hear it.


Tuesday, 22 September 2009

SharePoint Conference 2009

Yep, I am going to Vegas! :)
 
Got confirmation of this today, which I am extremely excited about.
 
I plan on releasing some blog content about the conference, some interesting tid-bits from the sessions. If you have any requests then please let me know.
 
If you are also going then I'd love to meet up! Post a comment here and I'll see if we can hook up, I'll be there all week!


Wednesday, 16 September 2009

RNIB - World's first AAA website launched in SharePoint

It's official, I am extremely proud to announce the launch of the world's first ever AAA accessible SharePoint website...
 
RNIB - supporting blind and partially sighted people
 
I am the SharePoint Solution Architect on this project, and I am pleased to present the key features as:
 
The difference is that ALL functionality on this website is presented accessibly (including backend editing and administration!)
 
Feature Set:
  • Full WCAG 2.0 AAA XHTML rendering
  • Accessible feature-set
    • WYSIWYG Page editing and publishing
    • Full list item editing
    • Accessible Web Part editing {Add | Remove | Update properties}
    • Full list views and list editing (including document libraries, Check-in Check-out and content approval)
    • Site Administration (Permissions | Navigation | Basic site settings | features | Recycle Bin | View Site Content}
All of this is built on our unique and totally re-usable SharePoint Accessibility Solution (SAS).
 
If you would like to know more, or have any feedback then please get in touch!


Friday, 28 August 2009

SharePoint 2010 - Hints, Tips and New Features - Watch this Space!

Well, the SharePoint Conference is just around the corner, and information about SharePoint 2010 will start seeping out of the woodwork soon enough!
 
Now, there is nothing that I can tell you now (there are heavy restrictions on the Non Disclosure Agreement we have with Microsoft) but I will be keeping my finger very much on the pulse and aim to start bringing out blog posts about the new functionality in SharePoint 2010 as soon as the NDA is lifted!
(no .. I will NOT release ANY information until officially sanctioned by Microsoft .. so please don't ask!)
 
I expect new materials will become "public knowledge" after the SharePoint Conference so hopefully I'll be able to start sending out tit-bits soon after that.
You can expect blog posts about:
 
  • Development - Code examples and Walkthroughs
  • New Features - new functionality and areas of the SharePoint 2010 product
  • Hints and Tips - tricks and "didn't know that .." information about the new build, and my experience with it once it becomes available.
So ... watch this space! Boy am I looking forward to the next 12 months!!


Monday, 17 August 2009

SharePoint Timer Jobs and Multiple Servers

Timer jobs are wonderfully robust creatures. They effectively replace the "Windows Scheduled Task" for SharePoint servers, allowing you to run .Net code on a scheduled or "one off" basis.

However, there can be some confusion about running Timer Jobs on multiple servers, so this should clear it up a bit.

  1. By default Timer Jobs will only execute on the server that they are called from (typically the Central Administration server)
  2. Through code you can specify a specific box (SPServer) to run your Timer Job on.
  3. It is possible to run a Timer Job on every server on the farm (although this can be dangerous!)

The crux of all this is based on the SPJobDefinition constructor (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spjobdefinition.spjobdefinition.aspx).

The constructor includes a parameter for an SPServer object, which allows you to specify which server the timer job will run on.

Example Code 1 – Add Job to single Server:

The code below is for a Web Application scoped which will register a job definition on a single server. As Web Application scoped features are activated from Central Administration, it will use the current SPServer (i.e. the Central Admin server).

This is useful for code which modified content in the database, as you only want it to execute a single time.

public override void FeatureActivated(SPFeatureReceiverProperties properties)

{

SPWebApplication webApp = properties.Feature.Parent as SPWebApplication;

SPJobDefinition job = new SPJobDefinition("CustomJobDef", webApp);

}

Example Code 2 – Add Job to All Servers:

The code below is for a Web Application scoped which will register a job definition on all web front end servers in the farm.

This is useful for code which modifies files or server settings, as you need it to execute separately for each server.

public override void FeatureActivated(SPFeatureReceiverProperties properties)

{

SPWebApplication webApp = properties.Feature.Parent as SPWebApplication;

foreach (SPServer server in SPFarm.Local.Servers)

{

if (server.Role == SPServerRole.WebFrontEnd)

{

SPJobDefinition job = new SPJobDefinition("CustomJobDef", webApp, server, SPJobLockType.None);

}

}

}

Hope this helps! Enjoy!



Tuesday, 4 August 2009

Turning off Audience Targeting on Page Libraries - Operation is not valid due to the current state of the object

Well .. this took a while to crack.
 
"Operation is not valid due to the current state of the object"
 
Anyone who has seen this will know it's a pain to track down. This particular one was even more painful that usual, because it was being thrown from the "Modify Audience Targeting" page of a Pages Library in MOSS 2007!
 
Do I did some rooting around and found a great post from Gary Lapointe (http://stsadm.blogspot.com/2008/08/enabling-audience-targeting-on-list.html) showing how to enable (or disable) audience targeting on a list through code.
 
However, there was a bug so it gave me the same error message!
The problem is that the field that we are trying to delete (Audience Targeting) is Sealed. So you need to set "Sealed=False" .. (I also set "AllowDeletion=True" as well to be on the safe side!)
 
The working code (modified from Gary Lapointe's original code) is as follows:
 
public static void SetTargeting(SPList list, bool enabled) 
        {  
                if (list == null) 
                    throw new SPException("List was not found."); 
               
                SPField targetingField = GetTargetingField(list); 
                if (enabled && (targetingField == null)) 
                { 
                    string createFieldAsXml = CreateFieldAsXml();
                    list.Fields.AddFieldAsXml(createFieldAsXml); 
                    list.Update(); 
                } 
                else if (!enabled && (targetingField != null))
                {
                    // make sure the field can be deleted!
                    targetingField.AllowDeletion = true;
                    targetingField.Sealed = false;
                    targetingField.Update();
                    list.Fields.Delete(targetingField.InternalName);
                    list.Update();
                } 
        }
You can see the highlighted section that I added to Garys code.
 
Cheers!
 
Martin