Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem consuming web service over HTTPS. (unexpected EOF)

Posted on 2007-11-26
3
Medium Priority
?
3,268 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 2000 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

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

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!
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
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.

715 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