Browse by Tags

All Tags » C# (RSS)

Calling Web Services That Use Self-Signed Certificates by smehaffie

When you try to call a web service that uses a self-signed certificate from a client application you get the following error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. This make sense...

Escaping/Unescaping XML Data by smehaffie

With as popular as XML is, when creating XML files you need to be able to escape certain characters that will not parse correctly if they are not escaped. Until recently I always did this like most other .Net programmers, I wrote a function to do it....
Filed under: ,

Random Number in C#, Be careful of some of the samples you find. by smehaffie

I recently came across this code on the internet for generating a random number with C#. 1: private static int RandomNumber( int min, int max) 2: { 3: Random random = new Random(); 4: return random.Next(min, max); 5: } The problem with this code is that...
Filed under: ,
More Posts