Getting system Timezones in different languages

Changing the CurrentCulture doesn’t work as the information comes from the registry (XP) or from the Multilingual User Interface (MUI) DLL (Vista, Windows 7). On Vista or Windows 7, you may install other languages and change the display language (Region and Language -> Keyboards and languages -> Display language). A reboot is required. This, and … Read more

Two Types not equal that should be

The same class / type loaded by different app domains [.NET] or class loaders [Java] will not compare equal and are not assignable to/from each other directly. You likely have two copies of the DLL containing that type – one loaded by the main program and one loaded by one of the Assembly.Load*(…) methods? Try … Read more

Json.Net deserialize out of memory issue

To read large JSON string with use of JsonConvert.DeserializeObject will consume your lots of memory. So One of the ways to over come from this issue, you can create an instance of JsonSerializer as given below. using (StreamReader r = new StreamReader(filePath)) { using (JsonReader reader = new JsonTextReader(r)) { JsonSerializer serializer = new JsonSerializer(); … Read more

C# Dynamic Keyword — Run-time penalty?

The question is very confusing. Does defining an instance as dynamic in C# mean: By “defining an instance” do you mean “declaring a variable”? The compiler does not perform compile-time type checking, but run-time checking takes place like it always does for all instances. What do you mean by “run-time checking like it always does”? … Read more

The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8)

Since the returned content type is text/html, I suspect your call result in a server-side error outside of WCF (you are receiving an HTML error page). Try viewing the response with a web debugging proxy such as Fiddler. (Edit based on comments) : Based on your comments, I see that your WCF is hosted under … Read more

How to check if process is not responding?

There is no general solution to this problem. It is impossible to tell if a particular process is hanging or not, because the term “hanging” is entirely dependent upon the context of the process that is executing. The hanging process will always do what it was coded to do. The developer may have coded it … Read more