best practice
How to: Correctly publish an InfoPath 2010 form template for use with SharePoint (or, how to troubleshoot a malfunctioning web form)

I tried to publish an InfoPath template the other day and ran into an issue: my form was only being displayed through the client application (InfoPath) but not on the browser. It was a web form. So, what was going on? I had created my content type, I had inherited from the right parent content [...]

Read More
Posted on 24th August 2011No Comments
How to: Troubleshoot SharePoint error message “Trying to use an SPWeb object that has been closed or disposed and is no longer valid”

This error definitely comes from not following Microsoft’s best practices. There’s a great article on MSDN about best practices that everyone should have a read through. Click to read now Best Practices: Using Disposable Windows SharePoint Services Objects. Your code will most probably look a bit like this: using (SPSite scName = SPContext.Current.Site) { using [...]

Read More
Posted on 8th August 2011No Comments
Best Practice: Create “My Site” host

When you setup your SharePoint environment you will create an initial web application and site collection. Also, a “My Sites” host will be created automatically. Your best move is to delete that host and create one manually. Delete My Sites Host In “Central Administration”, click on “Application Management” and then, under “Site Collections”, click on [...]

Read More
Posted on 5th July 20111 Comment
How to: Troubleshoot error message “This control does not allow connection strings with the following keywords: ‘Integrated Security’, ‘Trusted_Connection’.”

One of the things that you will be tempted to attempt quite early in your SharePoint 2010 journey, is to create a control that pulls data off of a database. In fact, SharePoint Designer does a great job in offering you this ability in just a few clicks. However, you will find that deploying to [...]

Read More
Posted on 28th February 20112 Comments
How to: Add a simple JavaScript button on the SP2010 ribbon

Single Button addition on the SharePoint 2010 Ribbon, using the available tabs and groups (no new definitions)! This is the first and simplest example of Ribbon customisation. More complex examples will follow. If you need a quick introduction to the SP2010 Ribbon before following through this example, please do jump here, where I explain the [...]

Read More
Posted on 27th October 20101 Comment
How to: Using the SharePoint 2010 Management Shell to Enable/Disable features

There will be a time that because of your custom code or for any other reason, SharePoint will refuse to operate as expected. Unfortunately, when SharePoint gives a JavaScript error in the Site Collection Features page, this means that you’re out of luck when trying to activate or deactivate a specific feature; even if it’s [...]

Read More
Posted on 21st October 2010No Comments
How to: Testing SharePoint installations and custom code

Testing the products of software development is, or should be, just as important as the development itself. Deploying a solution that does not work, or equally importantly, deploying a solution that worked in the development environment but for some reason, does not work in the production environment, is simply unacceptable. Visual Studio 2010 comes with [...]

Read More
Posted on 15th September 2010No Comments
How to: SharePoint Development like the Pros do it

It is most unfortunate but most people do not give credit to the Microsoft Download Center (MDC) when it comes to developing applications. I say that it is most unfortunate because, as it will become apperent from the links below, both the MSDN Netowrk and the MDC can provide developers with both invaluable tools and [...]

Read More
Posted on 13th September 2010No Comments
How to: Debugging custom code with the Developer Dashboard

As already mentioned, the developer dashboard is an invaluable tool for the developer who wishes to display information and debug SharePoint code. It is quite extensive too, as it displays information about all the aspects that a developer would wish to track, including SQL calls that are also linked to the entire command line (the [...]

Read More
Posted on 13th September 20102 Comments
How to: Setting up the Developer’s Environment

I was about to explain how I created my virtual machine for use as the main environment for SharePoint development but I believe that the guys at Wrox (who by the way, have a couple of very good books about SharePoint 2010 programming -i’ll provide the links at the bottom) have already posted a very [...]

Read More
Posted on 12th September 2010No Comments