Solved

Problem consuming web service over HTTPS. (unexpected EOF)

Posted on 2007-11-26
3
3,252 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
KPMT-Technician earned 500 total points
ID: 20351483
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
ID: 20561748
Forced accept.

Computer101
EE Admin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

623 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