Posts

Showing posts from April, 2009

400 Bad Request when trying to add a Web Reference

This morning, I had a hard time adding a Web Reference in my CF application pointing to a WCF service. I checked the service several times, re-built it several times as well, but each time I got a HTTP 400 Bad Request when clicking the "Go" button of the Add Web Reference wizard.
And then, I copied/pasted the URL one more time deleting the mex part at the end but leaving the ending slash. And it worked. I had removed the ending slash and thus caused this annoying behavior. I lost 5 minutes over such a stupid problem...

Hope it will help one of you someday :)

Accessing a WCF service using Compact Framework

A few constraints when connecting to a WCF service from a Compact Framework application :
The binding must be set to basicHttpBinding, CF does not know what to do with a wsHttpBinding.
The XmlSerializerFormat attribute must be set on the service contract, the default WCF serialization is not suitable for the CF. It would throw an exception when deserializing.Make sure you configure your endpoints correctly, "localhost" is not accessible from the mobile device (emulated or not), you can use ppp_peer as the hostname in the CF WCF proxy (a lot of CFs, I know).
Happy CF coding :)

Change the deployment URL of a ClickOnce application

I use ClickOnce everyday for several internal applications. Recently, I had to move the publishing website to a new host.
Here is how you can acheive a completely transparent move without annoying your users or forcing them to uninstall and reinstall the application.

First, you need to publish the deployment files on the new server. The deployment configuration is as follows :
Publishing folder : URL on the new serverInstallation Folder : URL on the new serverUpdates Folder : URL on the new serverRevision : last revision + 2 (very important)
Then you need to deploy a new version on the old server with an updates folder on the new server. This way, next time the application launches, it will get the new version from the new server, and voila. Here is the configuration for the last deployment on the old server :
Publishing folder : URL on the old serverInstallation Folder : URL on the old serverUpdates Folder : URL on the new serverRevision : last revision + 1 (very important)Enjoy :)

Migrate a SVN repository using VisualSVN Server

Today, I needed to relocate a SVN repository to a fancy new virtual server. I was planning on painful command lines and dumps and all the nerdy stuff. But in fact migrating using VisualSVN Server was surprisingly easy.
First I installed VisualSVN Server on the new host, then stopped the service on the old host. I copied the repositories files from the old server to the new one. And started the service after doing a little configuration (svn address, authentication mode, etc.). And then, I relocated my working copies using the svn relocate command (from TortoiseSVN).

Could it be easier ? I don't think so.
Happy source control :)