I am not gonna write a detailed entry today but I wanted to post some facts that might help someone:

WCF
Writing loosely coupled systems using WCF for communication purposes is a pain. First there is the service reference update which messes up xsd’s in relation with TFS. Secondly, when adding a reference in the client project it always set the address in the config file as being http://localmachinename.domain.local/service.svc instead of http://localhost/service.svc. While I understood the design, I really needed the localhost setting. Luckily I found out that if you set the endpoint address of the wcf server project to something specific to localhost (you don’t leave it empty as default) then when adding the reference in the client you get a localhost bound address.
Still, the contracts are reffered to as links to a specific machine and not your localhost. This means that developers getting the latest code have to update manually the refference and thus construct their own contracts.

IIS & Error Pages
I discovered a new setting in web.config in the customErrors tag: redirectMode.. By using it with the value ResponseRewrite, it is equivalent with using a Server.Transfer in the Application_Error handler of global.asax, preserving the error stack and additionally it preserves the url (looks nicer this way). Unfortunately from what I could gather, it’s IIS7 centric; I could not make it work on IIS6.

Leave a Reply