Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Remoting string comparison behaviour after Windows 10 update

Tags:

c#

remoting

I have a .NET remoting client/server application where my remote object has a method that returns a Dictionary as follows:

   public Dictionary<string, string> Test()
    {
        Dictionary<string, string> d = new Dictionary<string, string>(StringComparer.CurrentCultureIgnoreCase);

        d.Add("name", "test");

        return d;
    }

When this remote method is called by a client machine running Windows 10 with update 1709 (fall creator's update), the key lookup is no longer case insensitive, i.e. ContainsKey("Name") returns false.

This was not the case before update 1709 or if update 1709 is reverted. Also, if the string comparer is changed to StringComparer.OrdinalIgnoreCase (changing the server side only), ContainsKey("Name") returns true.

Both client and server are using the same region and language settings (English Ireland en-IE). Has something changed in this Windows update to cause this behaviour?

like image 750
JM1985 Avatar asked Jul 08 '26 22:07

JM1985


1 Answers

This might work for you.

public Dictionary<string, string> Test()
{
    Dictionary<string, string> d = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);

    d.Add("name", "test");

    return d;
}
like image 62
Sumit Shitole Avatar answered Jul 11 '26 13:07

Sumit Shitole