Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3288
  • Last Modified:

Problem consuming web service over HTTPS. (unexpected EOF)

Hi,

I'm having a problem consuming a SOAP web service with C#.

the WS is written in java, and the plan is to call it over SSL. The exact same web service is currently running on both http and https, and I can call both using a browser. However, when trying to invoke a function with a  C# console application, only the http one works.

the error I get is this one:
--------------------
The underlying connection was closed: An unexpected error occurred on a send.
Received an unexpected EOF or 0 bytes from the transport stream.
--------------------

I've tried exporting the certificate file from Internet Explorer and used this code to add the certificate, but it still does not work.
this.ClientCertificates.Add(X509Certificate.CreateFromSignedFile(@"C:\ver.cer"));

I get the same error when I try to add a reference by using "Add Web Reference..."


As I said before it's the exact same web service running on both http and https and both work through a browser, while it only works over http from my C# app.


Any ideas? Could the problem be on the server side of things?
0
nediam1234
Asked:
nediam1234
1 Solution
 
KPMT-TechnicianCommented:
Are you using VS 2005?  Because there is a WSE 3.0 plug-in http://msdn2.microsoft.com/en-us/webservices/Aa740663.aspx that will help you create the secure communication between web server and web/windows applications.  The above link has a article on how to use the plug-in.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now