Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Server was unable to process request. ---> System.InvalidCastException

Server was unable to process request. ---> System.InvalidCastException

Scheduled Pinned Locked Moved Visual Basic
sysadminhelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nitin1981
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • N Nitin1981

      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

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups