Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 2nd, 2003, 01:50 AM
Registered User
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error when using client certificate over SSL

Hi,

I am trying to connect to a web service using a client certificate over SSL. I get a "The underlying connection was closed. Could not establish a secure SSL/TLS connection" exception.

ServicePointManager.CertificatePolicy = new MyCertPolicyClass();
wreq.ClientCertificates.Add
(X509Certificate.CreateFromCertFile("c:\\myx509.ce r"));
wreq.Method = "POST";
string poststring = requestXML;
wreq.ContentLength = poststring.Length;
wreq.ContentType = "text/xml";
StreamWriter sw = new StreamWriter(wreq.GetRequestStream());

I get an error when I am trying to obtain the request stream in order to send the request XML.

I am able to do a GET from a browser using the certificate successfully. So, I know the certificate is valid and trusted by the web server.

I am also able to read the properties of the certificate from the code.

Any pointers would go a long way!

Thanks in advance,

Subra







Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding SSL Certificate to Server.xml ZiGz BOOK: Professional Apache Tomcat 0 August 24th, 2007 08:56 PM
Client should not see any error gaurav_jain2403 ASP.NET 1.0 and 1.1 Professional 3 May 30th, 2006 02:36 AM
error message using ssl : "VS .NET cannot create.. connect2sandep ASP.NET 1.0 and 1.1 Professional 0 October 20th, 2005 11:37 AM
MSXML2.HTTP and a bad SSL certificate lian_a Classic ASP XML 0 February 16th, 2005 03:49 AM
Client Tools Installation error? morpheus SQL Server 2000 1 April 27th, 2004 01:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.