I have a very curious thing happening in my application with HashTables.
First: Yes, I know that HashTables are not supposed to be ordered as they were inserted, or in any other way (but with a hash of keys). This does not answer my question. I donβt need this, I just want to know WHY it differs from two seemingly identical systems.
So there it is. The left side is the IIS order, the right is Visual Studio.

Why is it different? Given that .NET should (?) Use the same algorithm to store and return data from a HashTable, the order should be the same on both sides, right?
If, as I found out, the hash key is hashed, then this hash must be the same on both systems, which leads to the same order of hashes (keys) and, therefore, the same order of data in the hash table.
Where am I mistaken? What is the difference in implementing a HashTable between IIS and VS?
A few comments from the comments:
- The project is for .NET 4.0
- IIS uses .NET 4.0 for the application pool.
- I actually copied the compiled binaries from the Visual Studios
bin folder to the IIS folder, so they are exactly the same - My guess is that IIS uses the same .NET implementation as Visual Studio. If not: why? And what makes hashing on IIS so different from what is in Visual Studio?
source share