Type Load failure in Web Service Client

  • Thread starter Thread starter Nathan Mellor
  • Start date Start date
N

Nathan Mellor

A customer has reported a failure in calling a web service:

Cound not load type
System.Web.Services.Protocols.Soap HttpClientProtocol
from assembly System.Web.Services, Version=1.0.5000.0,
Culture= neutral PublicKeyToken=......

This sounds like when a dll is missing or misversioned. However,
System.Web.Services is a CF dll that should be present, and this error does
not happen all the time. It has happened at least once for the customer, and
I have not yet been able to reproduce it.

He is using CF V1 SP 2, I believe.

Is there any reason one can see for an occasional failure of this type? I
thought of possibly tight memory as the cause.

Nathan
 
Nathan Mellor said:
A customer has reported a failure in calling a web service:

Cound not load type
System.Web.Services.Protocols.Soap HttpClientProtocol
from assembly System.Web.Services, Version=1.0.5000.0,
Culture= neutral PublicKeyToken=......

I get errors that are similar to this, sometimes, using a TcpClient when
calling a connection that fails.

one possible solution is to wrap the call with a try catch and handle it in
a "friendly manner". Just ask them to click again.
 
Chance Hopkins said:
I get errors that are similar to this, sometimes, using a TcpClient when
calling a connection that fails.

one possible solution is to wrap the call with a try catch and handle it
in a "friendly manner". Just ask them to click again.

Thanks.

This makes some sense when I look at the generated code. The derived
contructor sets the URL. If the base constructor is checking for something,
it could fail. A TypeLoad can definitely happen if a constructor throws an
exception.

I'll try failing gracefully and give a chance for retry, since there is a
number of things that can go wrong here.

Nathan
 
If publicKeyToken=b77a5c561934e089, you're using one or more assemblies
compiled against desktop runtime.

This is not allowed, but might work on CF RTM/SP1 in some cases. SP2 put a
stop on that.

The most common reason for it is to choose desktop library project instead
of device library project.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
Back
Top