WCF with handcrafted WSDL generated no FaultExceptions

This is problem that has haunted us for the good part of the autumn and winter; early on in our design process we chose to create the WSDL for our services by hand. This decision mainly had to do with that you can express stuff in XSD that WCF-attributes doesn’t support, such as string length etc. Also we were using the ErrorHandlerAttribute found in the excellent book “Programming WCF Services” by Juwal Löwy. What we saw was that even though we had created the wsdl for handling the fault and their details correct, we didn’t get the details over to the client (that is the T of FaultException<T>). We checked the wsdl and the generated client proxy (and it’s wsdl) file over and over, and line by line but just couldn’t find it. And finally it dawned on us… It was Mr Löwy’s fault ;). Seriously - it was the...
Read More

2008 - another great year

To sum up 2008 is not very hard for me - it starts and ends with Abbe (Albert). He was almost a part of our lives at the start of 2008 since he took up considerable space in Elin’s belly. :) He went from: to: In work I don’t think I ever learned so much in one year (TFS, SOA, MSBuild, WCF, Oracle just to mention a few things I have touched during the year). But it come to a cost - where I also lost my ability to leave work at work when I go home. I’ll try to improve that next year - which won’t be hard since I will be home with Abbe for about six months. With the Vasa Band it was also a great year with the recording and release of our CD Priority and a tour of the western parts of Sweden. On top...
Read More

About this blog

Lately I have been asked the question why I have this blog, several times actually. I honestly thought that I wrote that in the first posting I did, but it was very short. Not even when I change into www.marcusoft.net I wrote something about it. But the reason for the blog is, and has always been this simple: I write about things that interest me and when they catches my attention. For several years I did notes in diffrent kind of notebooks at different customers. Always forgot them when I left. So now I have them in one place. I often link to the blog for solutions to problems I have and solve. I then and then write about private stuff also, in the same manner - when it feels good. I write in english to keep my english up to date. So there you have - the reason for...
Read More

Compress a string with zip

[UPDATE START] We found a nasty performance bug in the code below. The DeCompress-method copies a string for each turn in the loop. That is a classic problem that creates a new copy of the string for each row. That became a major problem for a 3.8 Mb string… I have now updated the code to use the System.Text.StringBuilder object instead. That took down the speed to about a tenth. Sorry that I didn’t catch that… [UPDATED STOP] We had a quite special need the other day; we wanted to compress a part of our request, namely a XML-string that was sent to us. Most of the examples I found on the net showed how to compress the content of a file. But here is the code that compress a string. The code uses ICSharpCode.SharpZipLib. Here you go: /// <summary> /// Compress strings with ICSharpCode.SharpZipLib /// </summary> public class StringZipper...
Read More

UTA058 The test engine cannot run tests in the assembly for out integration test

We have a done a MsTest-dll that contain our integration tests that is run after each deploy to our daily build environment. However on our new build server we ran into problems with the following error message. “UTA058: The test engine cannot run tests in the assembly” OK - it seems that you need to configure .NET Framework to allow running assemblies from network shared. I found this description on how to solve it (potentially the longest URL on the net ;). But we ran into more trouble… The .NET Framework 2.0 Configuration was no where to be found. As it seems that tool disappears when the .NET Framework 2.0 SDK is installed. Where it disappeared to is a another question that I haven’t found an answer to. However the great description also told us how to handle the problem on the command prompt, with the caspol-tool. To make a...
Read More

SOAP UI - a great way to do integration tests for services

Just found this tool - or actually I’ve used but missed it’s greatness… The SoapUI can be used to automatically generate clients to access web services. But furthermore it can be used to test web services. With the tool you can generate test request and setup the expected response. This is setup via a nice GUI. The requests and responses can then be run, in sequence or one by one. What a great way to do integration tests for a service. Just imagine - you have 100 pre-built request/response-files and just run them (from the command prompt as part of you nightly build of course). Since not much coding skills are required you can easily put the SoapUI  in the hands of a tester and maintain the requests/responses as checked in files. Now we just need to find a way to run the test against WCF services. We can always...
Read More

Abbe - a December update

I know that a lot of people has been wondering why no new pictures of Abbe has been on display here for a while. Well - a too busy autumn may be one reason. Anywho - here you go… Almost forgot - he said a very loud and clear “PAPPA” last week!
Read More

Christmas times - hectic times

A very hectic time is closing into an end… the day after tomorrow will be the first day in ten days that I’ve been free after work. Phew! To much! But fun stuff too: We did two concerts with my Salvation Army Corps and they were both great. The Vasa Band and Vasa Gospel holds these concerts each year. This year at our newly renovated corps. I was in the planning group as well as doing the presentations during the concert. Very fun! This weekend was another highlight since I (once again) was presenter for the Lucia-concerts of the Windcorp Brass Band. This year I even got the opportunity to play with them due to a late change in the parts. Also the guest soloist was Richard Marshall of the Black Dyke Band, which is a bit like a football player that get to meet David Beckham! A great thrill...
Read More

Working directory for Build Agents and building different branches

We have been chasing a strange problem for a few days now. The scenario is as follows; We created a new TFS build server, that is - we set up the build service on a new server. In our TFS Source control we had two branches with a build definition for each. Finally we set up a Build Agent for the new server via Visual Studio Team System. But the builds failed! With error message “The path [path] is already mapped in workspace [workspace]” We didn’t get why until we checked a property on the build agent; Working Directory. This can be set by right-clicking on the Builds-folder in Team Explorer, choosing the agent and the Edit. On the Build Agent Properties page there is a WorkingDirectory-textbox. This dictates where the agent should build. However - what not is shown is that you can use a variable in the path:...
Read More