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. C#
  4. InvalidCastException with CAPICOM and webServices

InvalidCastException with CAPICOM and webServices

Scheduled Pinned Locked Moved C#
helpcsharpsysadmin
3 Posts 3 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.
  • E Offline
    E Offline
    Escroto
    wrote on last edited by
    #1

    Hello, i am developing a web service in c# and i have the following problem. The requests and the responses are signed with CAPICOM.SignedData, when the server receives the request and verify the signature, he builds a response which is serialized and signed before going to the client. When the client receives the response, the signature is correctly verified, but when the data are going to be deserialized comes the exception InvalidaCastException (when i try to cast the object returned bu the formatter to the data type defined in a separated class). Thank you in advance for your help!:-O

    A 1 Reply Last reply
    0
    • E Escroto

      Hello, i am developing a web service in c# and i have the following problem. The requests and the responses are signed with CAPICOM.SignedData, when the server receives the request and verify the signature, he builds a response which is serialized and signed before going to the client. When the client receives the response, the signature is correctly verified, but when the data are going to be deserialized comes the exception InvalidaCastException (when i try to cast the object returned bu the formatter to the data type defined in a separated class). Thank you in advance for your help!:-O

      A Offline
      A Offline
      Alex Korchemniy
      wrote on last edited by
      #2

      Just an idea. You probably checked this already. Make sure that both your webservice and your client reference the same library (data type that is serialized). Make sure that you have identical version of the libary on both the client and webservice.

      B 1 Reply Last reply
      0
      • A Alex Korchemniy

        Just an idea. You probably checked this already. Make sure that both your webservice and your client reference the same library (data type that is serialized). Make sure that you have identical version of the libary on both the client and webservice.

        B Offline
        B Offline
        beowulfagate
        wrote on last edited by
        #3

        Could we see some code? probably the entire function that includes the part where InvalidCastException occurs?

        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