I am writing a client for an HTTPS web service using WSE 1.0 but I
always get an error like "The underlying connection was closed: An
unexpected error occurred on a send."
Sometimes the error "occured on a receive".
Looking around, I find
http://weblogs.asp.net/jan/archive/2...08/128394.aspx ("Solving
"The underlying connection was closed" when using WSE"), that sets
KeepAlive to false, but it doesn't work for me since when I get to the
part:
System.Net.WebR equest request
= base.GetWebRequ est(uri);
I always get NullReferenceEx ception.
Anyway that solution seemed to be for cases when there was an
occasional accummulation of requests. In this case, I am only sending
one request, the server (which I don't control) is probably not busy,
and I get the error every time.
Other things I have tried are:
proxyPeticionSi ncrona.UnsafeAu thenticatedConn ectionSharing= true;
proxyPeticionSi ncrona.PreAuthe nticate= true;
proxyPeticionSi ncrona.Credenti als=
System.Net.Cred entialCache.Def aultCredentials ;
but they make no difference.
When I try the service from a browser I get questioned about the
certificate (its authority is not recognized and it is for another
machine) but after accepting the dialogs it shows me a SOAP fault. My
client can't reach the fault stage.
I take care of the certificates with:
System.Net.Serv icePointManager .CertificatePol icy
= new AcceptAllCertif icatePolicy();
which should be enough, I guess. It returns true on
CheckValidation Result.
I am using WSE 1.0 SP1. I have also installed Service Pack 1 for .NET
1.1 but it made no difference.
I have tried to activate the WSE trace in my web.config:
<configSections >
<section name="microsoft .web.services"
type="Microsoft .Web.Services.C onfiguration.We bServicesConfig uration,
Microsoft.Web.S ervices, Version=1.0.0.0 , Culture=neutral ,
PublicKeyToken= 31bf3856ad364e3 5" />
</configSections>
<microsoft.web. services>
<diagnostics>
<trace enabled="true"
input="inputTra ce.config"
output="outputT race.config"/>
</diagnostics>
</microsoft.web.s ervices>
but these .config files appear nowhere.
I have an equivalent client in Java that runs OK.
I also have another WSE 1.0 client (unfortunately, I only have the
binaries) for this service that is getting these same errors and also
one about not establishing a secure channel for SSL/TLS. This client
worked from another part of the intranet, so it could be a problem of
configuration, but I cannot figure what it would be.
Has anyone had a similar experience? Can you point me somewhere to
look?
Thanks in advance.
--
David Mediavilla