Visual Studio 2010 Workflow + Infopath 2010 forms - troubleshooting

Microsoft markets that Sharepoint Designer workflows are directly exportable to Visual Studio workflows. And in many ways, this is absolutely true. It’s trivial to create a .wsp from an SPD workflow and import it to VS. However, if you then inspect the workflow that has been created for you, a little concern would not be underestimated. If your SPD workflow was what you wanted, then you could be reasonably confident that its VS version would do the same job. But presumably your reason for importing to VS is because you need more control over the workflow in the longer term, in which case, you’re likely to be left underwhelmed by what the import process creates for you. Imagine creating a webpage in Microsoft Word and you’ll get the drift.

So when faced with a similar proposition, recreating the workflow in Visual Studio from scratch immediately became apparent as the best solution. After all, the intent and purpose of the workflow was clear; recreating it in VS ought to have been a doddle. However, to complicate matters, the SPD workflow used Infopath edit forms. This turned out to be easy in SPD, but non-trivial in Visual Studio. Getting an Infopath form to register with a VS workflow project requires various items, that VS may not do automatically for you.

Read more

Could not load web.config file. The given key was not present in the dictionary.

Quick hint about debugging SharePoint projects in Visual Studio 2010. You may find a bizarre error where deploying projects/solutions is fine, but trying to debug doesn’t work. You see an error alert with the text: “Could not load the Web.config configuration file. Check the file for any malformed XML elements, and try again. The following error occurred: The given key was not present in the dictionary.” Checking the Web.config shows no malformed XML at all. One thing to check into is the configuration of alternate access mappings in Central Administration.

Read more

new SPSite - FileNotFoundException

It seems to me that every SharePoint developer, at some point in their career, will encounter this particular error. It’s one of those infuriatingly obtuse errors that could be caused by a multitude of different issues - either individually or cumulatively. In my case, I was in the middle of developing a SharePoint timer job and I had a particular piece of code that I wasn’t too sure about, and so wanted to test very quickly, over and over again - without the rigmarole of deploying/retracting solutions, hunting through Central Admin to run the job, etc.

Read more

Simplified deleting in OSX Finder

I finally got around to solving a longstanding irritation I’ve had with Finder. Well, when I say that, what I mean is, I posted the irritation to a forum, and some helpful folks there gave me the inspiration for the solution. The irritation: Quite often I copy a bunch of images off my phone on to my laptop. In Finder I open them up and use the quickview (using spacebar) to quickly view and delete items [using the keyboard only]

Read more

Turbocharge your SQL development: get more out of SQL Server Management Studio

When SQL Server 2000 became SQL Server 2005, a huge number of things changed. DTS became SQL Server Integration Services, and as part of the package we saw the likes of Analysis Services and Reporting Services. All these additions to the SQL Server family necesitated a change in the suite of management tools - and that meant the death of Enterprise Manager and SQL Query Analyzer, tools loved by everyone, everywhere. They were combined and rebranded as a single tool: SQL Server Management Studio.

Read more

Quick tip: Use OVER to get row numbers in subsets

Consider the following. You have a set of data. Within the data are multiple subsets that share an identifier. WIthin your main set, you need to number the subsets for each item within it, e.g., Data ID SubsetID Name Lots more columns… ———- ———- 1 ABC Dave 2 DEF Trev 3 DEF Bob 4 DEF Steve 5 HIJ Jim 6 HIJ Bilbo and you want something like ID SubsetID SubsetPosition Name Lots more columns… ———- ———-

Read more

Guide: MOSS 2007 Multiple site collections on Port 80

Requirement: multiple site collections on port 80 on unique URLs in SharePoint 2007, e.g,. http://democlient1, http://someotherdemo
The scenario: you have one development machine which you use for multiple clients. Because of this, you want to host multiple site collections and allow a unique URL for each, without having to specify the port number in the URL. For example, if your machine name is SPDEV then by default your primary web application will respond on http://spdev. But you also want to have http://democlient1, http://someotherdemo, etc. There are a three ways of doing this. The two common ways are 1) assign unique IP addresses to each web application each responding on port 80, but this can be more complicated to setup and manage at the machine level, or 2) Use a non-standard port number for each web application, but this creates uglier URLs, e.g., http://democlient1:18765, http://someotherdemo:18734 etc.

Solution: It’s possible to achieve the requirement.

Read more

Allalinhorn (the easy way)

After our fairly epic 12 hour ascent of the Weismies, we took a rest day. Not surprising really - all four of us were in varying stages of pieces. It meant we had to abandon an ascent of the Lagginhorn - that looked like a full on day. In reality, I felt I might have made it up, but must admit I wasn’t too upset to find myself on a cable car going down the valley from the Weismies Hut.

Read more

The Weissmies Traverse

5am start. 40 other people all doing the same. Force yourself out of a warmish bed to a very cold Alpine hut. Bag was packed the evening before so it’s just extra clothes on then downstairs for breakfast. Cereal and milk, bread and jam and some hot but tasteless black water, or coffee, as they were calling it. Sense of trepidation about what lay ahead. On paper it was a 1,300m ascent to 4,020m, but this was via rock ridge and a narrow snow ridge.

Read more

Saas Valley 2010

Holidays this year were a week in the Saas Valley in the Swiss Alps in Switzerland. It was my Dad’s idea, and when he suggested I join him and family friend Brian and mountain leader Mike for some climbing 4000m mountains, I thought why not? Bonding time with the old man, how bad could it be? Well, I made the mistake of checking out some video before going and was soon wondering what I’d let myself in for.

Read more