Server was unable to process request. ---> System.InvalidCastException
-
Hi! I'm using a web service which is called through a stored proc from a windows service. Until few days back everything was working fine but suddenly I'm getting the following error.
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidCastException: Conversion from string "29/04/2008 13:45:57" to type 'Date' is not valid. at Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(Stri
Further I'm able to run the webservice through code. My regional settings has dd/MM/yyyy settings for date i.e British. And I've also checked culture for my thread that is also british. I dont know what else is needed to get it working. Please guide me in getting a solution. Thanks in advance.
Don't Quit
-
Hi! I'm using a web service which is called through a stored proc from a windows service. Until few days back everything was working fine but suddenly I'm getting the following error.
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidCastException: Conversion from string "29/04/2008 13:45:57" to type 'Date' is not valid. at Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(Stri
Further I'm able to run the webservice through code. My regional settings has dd/MM/yyyy settings for date i.e British. And I've also checked culture for my thread that is also british. I dont know what else is needed to get it working. Please guide me in getting a solution. Thanks in advance.
Don't Quit
Try forcing the date/string format to dd/MMM/yyyy. This tends to remove any ambiguity in the conversion process. You only need 1 machine/application in the system that does not look after the culture correctly to these problems. Text month usually solves this issue
Never underestimate the power of human stupidity RAH