Hi all,
i have one problem with a method of an xml web service that use a datetime data type input variable, and may be all is caused by international settings.
The XML web service (localized in italy, with italian settings) have the following method:
MYXWS.MyMethod(input_var as datetime)
On my dev machine (localized in italy, with italian settings) i have created a web application that use the proxy class for call the XML wer service, and all work fine.
Code used MYXWS.MyMethod(now().Date)
When i upload the compiled web app on my production machine (localized in USA, with USA settings) when the web app (a webForm) use the proxy class that call the XML Web service i get from the XML Web service the following error:
Server was unable to process request. --> The conversion of a char data type
to a datetime data type resulted in an out-of-range datetime value
It seem that on dev machine the proxy class call the method using "dd/MM/yyyy" format (as italian settings), and on production machine use "MM/dd/yyyy" format.
I have already included in my web app the following code
in web config
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="it-IT" />
in webform
Dim myculture As System.Globalization.CultureInfo
myculture = New System.Globalization.CultureInfo("it-IT")
System.Threading.Thread.CurrentThread.CurrentCultu re = myculture
System.Threading.Thread.CurrentThread.CurrentUICul ture = myculture
But the problem is not solved.
Any idea??
Thank you
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>udmB9pSkCEOuHIp95SPjDQ==</Id>