gennaio 2008 Blog Posts

Strange xml parsing behavior (at least to me!!!)

If you load an xml document with the dom (I tried it with MSXML and System.Xml.XmlDocument) that has the node content set to > (greater than) the value is escaped by the parser. If you specify an xml (containing the greater than sign) as the node content it isn't escaped. So if you have <root>></root> you'll get <root>&gt;</root> if you have  <root>><foo /></root> you'll get (the same) <root><foo /></root> Strange!

Echo server in c#

A friend of mine asked me some help to troubleshoot accessing a device in his home network from internet. I'm not an expert of networks but with the help of www.portforward.com and a simple c# winform I succesfully manage to made things work. The program listen on the specified port and responds with a simple hello message and the ip of the caller. This is handy if you don't know what the service should reply and you want to be sure that the problem didn't lie on the service not replying correctly. The program uses HttpListener that leverage the http.sys...

Configuring WCF for client certificate authentication

Below the steps to follow if you need to connect an IIS hosted WCF client to a IIS hosted WCF server via a WSHttpBinding with transport security using client certificates. On the server implement your service and configure like the following... 1: <system.serviceModel> 2: <behaviors> 3: <endpointBehaviors /> 4: <serviceBehaviors> 5: <behavior name="MyBehavior"> 6: <serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" /> 7: ...

«gennaio»
domlunmarmergiovensab
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789