0

While this is similar to How to solve this Exception "Culture is not Supported"? I thought I'd post this as its specific to accessing a Web Service from a .NET application. I recently ported my very old project to a new machine with windows 11. The application has a call to a soap web service and I received this error:

 System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> 
 System.InvalidOperationException: There is an error in XML document (1, 2001). ---> 
System.ArgumentException: Culture name 'en-il' is not supported.
Parameter name: name  .....

It was working fine on the old machine.
The data service is sent a dataset (xml document) from the client to the server and then processes it on the server.

Haim Katz
  • 455
  • 3
  • 15

1 Answers1

0

I was able to identity that the dataset in the client request has a property called Locale whose value is by default set to the default input language of the client. In my case the new machine's default input language was 'en-il'.
The solution is either to set the locale of the dataset to en-il prior to the soap request,

mydataset.Locale = System.Globalization.CultureInfo.GetCultureInfo("en-US")

or changing the default input language of the local machine.

Haim Katz
  • 455
  • 3
  • 15