Re: System.InvalidCastException in SoapMessageAccessClientExtension in SoapHttpClientProtocol.Serialize method

From: Sami Vaaraniemi (samivawantsnospam_at_jippii.fi)
Date: 02/27/04


Date: Fri, 27 Feb 2004 04:33:21 -0700

There is not enough information in your post so I could say what exactly the
problem is. It appears to be a client side problem, though. The
InvalidCastException occurs in the client-side SoapExtension
(SoapMessageAccessClientExtension) when it processes the outgoing message.

Problems that involve conditions such as: "works correctly for another
indefinite period and falls over again" usually point toward a failure to
release an unmanaged resource in a timely manner.

I would debug this by running the client under the debugger. Set up the
debugger to break when an InvalidCastException is thrown. The exception is
occurring in your own component (SoapMessageAccessClientExtension) so you
should be able to see what's going on as long as the SoapExtension was
compiled in debug mode.

hth, Sami
www.capehill.net

"Ben Reid" <benedict@memia.com> wrote in message
news:60c76d70.0402260723.5bd3be65@posting.google.com...
> Hi,
>
> We have a system which calls a number of third party web services (all
> on the same remote server). The system passed all tests and went into
> production with real-world users and very soon (within an hour or so)
> we started intermittently receiving the following exception message
> when calling web services:
>
> System.InvalidCastException: Specified cast is not valid.
> at
{OurNameSpace}.WebServices.SoapMessageAccessClientExtension.StoreRequestMess
age(SoapMessage
> message)
> at
{OurNameSpace}.WebServices.SoapMessageAccessClientExtension.ProcessMessage(S
oapMessage
> message)
> at
System.Web.Services.Protocols.SoapMessage.RunExtensions(SoapExtension[]
> extensions)
> at
System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMes
sage
> message)
> at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters)
>
> The system then continued to return this error message on every Web
> service call until the App context (executing inside a COM+ DLLHOST
> process) is reset, after which it continues correctly for another
> indefinite period and falls over again.
>
> We have been investigating this for a couple of weeks now, and it
> appears that none of the parameters we are passing in cause the
> application to throw this exception in any repeatable manner. (ie the
> cause is environmental and cumulative.)
>
> Has anyone else seen anything like this?
>
> [To complicate matters further, our application runs on .NET 1.1, but
> the web services are hosted on .NET 1.0].
>
> Your comments are appreciated in advance.
>
> Cheers
>
> Ben Reid



Relevant Pages

  • Re: Handling Exception in Web Services when using HttpGet protocol.
    ... > I have an application with several web services. ... > The problem is that my application web.config also enables the HttpGet ... When a client calls my web services ... > I get information about the exception itself. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Programmatically turn off custom errors for current request
    ... We are now having to integrate some Web services into the ... >behavior of Forms Authentication ... >exceptions that can be handled by a non GUI client (ie. ... >client to Error.aspx and logging the exception on the server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Handling Exception in Web Services when using HttpGet protocol.
    ... I have an application with several web services. ... The problem is that my application web.config also enables the HttpGet ... When a client calls my web services ... I get information about the exception itself. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Handling Exception in Web Services when using HttpGet protocol.
    ... I have an application with several web services. ... The problem is that my application web.config also enables the HttpGet ... When a client calls my web services ... I get information about the exception itself. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: VC++, Windbg and appl verifier
    ... > and i can press 'g' and the server is running unitil i get the exception. ... I have not added the client to appl verifier, so how come that VC is ... If the server cannot start under debugger, make sure that you enter the full path ...
    (microsoft.public.dotnet.languages.vc)