InvalidCastException with CAPICOM and webServices
-
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
-
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
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.
-
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.
Could we see some code? probably the entire function that includes the part where InvalidCastException occurs?