And C# stopped working...

I had a problem in the production environment of a major customer recently.

Windows 2008 R2 without SP1 and some updates, and C# stopped working.

Basically, when I used AddRange() to transfer values from one collection to the other, the value did not go across. Note - the value did not go across. The source and target collection had one item in it, but in the source, there was a value, in the target it was NULL or BLANK.

I verified that the source collection had a value which was not null and not blank and not whitespace - many people verified over and over again that this was so.

This was logged to the file, both using my regular logging and also with a string builder. Many people verified, and reviewed that indeed, the C# executable was failing to copy over a value which it was saying is not null, blank or whitespace to another collection.

We rebooted the server, installed .NET Framework updates - but every time this code would behave exactly the same way.

Finally to fix it, I had to remove the use of the second collection and just put the value directly into the target.

Weird. Yes.

Never seen vanilla C# code behave like this in PROD - only on one server though. The exact same code works fine on other servers.

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

The ridiculous interview experience