J
JohnD
Hello
I’ve got a problem consuming a Web service made by another company (who use
J2EE). The Web service requires an X.509 certificate, which I pass in using
the ClientCertificates property of the service proxy object.
I’m using .NET Framework v1.1.4322.
The issue is bizarre in that it behaves differently on different machines.
On my development machine (Windows XP Pro SP2, VS 2003 Ent Arch), accessing
the service works fine when I’m in a Windows Forms (or console) application.
When I use the *exact* same code on a Web application (or Web service),
however, I get this error message:
---
[Win32Exception (0x80004005): The message received was unexpected or badly
formatted]
[WebException: The underlying connection was closed: Could not establish
secure channel for SSL/TLS.]
---
The error is happening on the call to the Invoke method inside the proxy.
I’ve tried tracing the SOAP messages using the SOAP Trace utility in the
Office SOAP toolkit, but no messages seem to get transferred. This makes
sense, since I also looked at the Event Log and found this entry (after
setting SCHANNEL EventLogging to 7):
---
The remote server has requested SSL client authentication, but no suitable
client certificate could be found. An anonymous connection will be attempted.
This SSL connection request may succeed or fail, depending on the server's
policy settings.
---
When I tried this procedure on another machine (also running Windows XP SP2,
VS 2003 Standard) it came up with this error message all the time – it didn’t
even work for a Windows or console app. I also tried it on a Windows Server
2003 box (without VS) and it didn’t work at all there either.
I went back to my development machine and tried accessing one of our own Web
services (written in .NET, and doesn’t require X.509 client certificates) and
it worked perfectly, on all machines, with all types of application.
I’ve spent much of the day trying to figure this out, and can’t really see
very much information on it anywhere. The main thing that has me stumped is
that it works on Windows on my dev machine but not under a web app, and that
it doesn’t work at all on the other machines.
Any help would be gratefully accepted.
Thanks
John Downs
I’ve got a problem consuming a Web service made by another company (who use
J2EE). The Web service requires an X.509 certificate, which I pass in using
the ClientCertificates property of the service proxy object.
I’m using .NET Framework v1.1.4322.
The issue is bizarre in that it behaves differently on different machines.
On my development machine (Windows XP Pro SP2, VS 2003 Ent Arch), accessing
the service works fine when I’m in a Windows Forms (or console) application.
When I use the *exact* same code on a Web application (or Web service),
however, I get this error message:
---
[Win32Exception (0x80004005): The message received was unexpected or badly
formatted]
[WebException: The underlying connection was closed: Could not establish
secure channel for SSL/TLS.]
---
The error is happening on the call to the Invoke method inside the proxy.
I’ve tried tracing the SOAP messages using the SOAP Trace utility in the
Office SOAP toolkit, but no messages seem to get transferred. This makes
sense, since I also looked at the Event Log and found this entry (after
setting SCHANNEL EventLogging to 7):
---
The remote server has requested SSL client authentication, but no suitable
client certificate could be found. An anonymous connection will be attempted.
This SSL connection request may succeed or fail, depending on the server's
policy settings.
---
When I tried this procedure on another machine (also running Windows XP SP2,
VS 2003 Standard) it came up with this error message all the time – it didn’t
even work for a Windows or console app. I also tried it on a Windows Server
2003 box (without VS) and it didn’t work at all there either.
I went back to my development machine and tried accessing one of our own Web
services (written in .NET, and doesn’t require X.509 client certificates) and
it worked perfectly, on all machines, with all types of application.
I’ve spent much of the day trying to figure this out, and can’t really see
very much information on it anywhere. The main thing that has me stumped is
that it works on Windows on my dev machine but not under a web app, and that
it doesn’t work at all on the other machines.
Any help would be gratefully accepted.
Thanks
John Downs