Solved

Problem consuming web service over HTTPS. (unexpected EOF)

Posted on 2007-11-26
3
3,212 Views
Last Modified: 2009-02-13
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
Comment
Question by:nediam1234
3 Comments
 
LVL 5

Accepted Solution

by:
KPMT-Technician earned 500 total points
Comment Utility
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
 
LVL 1

Expert Comment

by:Computer101
Comment Utility
Forced accept.

Computer101
EE Admin
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
This video teaches users how to migrate an existing Wordpress website to a new domain.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now