Archive

Archive for December, 2006

The underlying connection was closed.

December 20, 2006 Comments off

There seems to be a big problem with the underlying code behind the sockets classes that Microsoft uses in their .NET framework. Many people are getting a ?The underlying connection was closed.? error message, but there doesn?t seem to be any consistency to it. I sent a simple test program using the code below to a friend in Singapore and he gets the error. Well, I decided to create a very simple Socket program to see if he gets the error with it as well, and sure enough he does. His Windows XP computer is fully patched too. Some people are getting this error when connecting to a web service, and they have found a way to get around it most of the time, but the error still comes back from time to time even with that patch. This however, isn?t a web service, just a simple WebClient piece of code that connects to a web server.

Microsoft has yet to release anything on this.

WebClient Class

a_url = ?http://www.google.com?;
System.Net.WebClient WC = new System.Net.WebClient();
data = WC.DownloadData(a_url);

The follow socket class also throws the error, not with me, but with some people that I send it too. It seems to be random.

Read more…

Categories: .NET, .NET 2.0, C# 2.0

ini File Access with VB.NET

December 20, 2006 Comments off

I thought I’d share a usefull VB.NET class for accessing .ini files. There are better ways to store local application settings than using a .ini. Sometimes it is nessessary to access legacy .ini files and this should help you get there.
Read more…

Categories: .NET, VB.NET