<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Accepting a Flaky Certificate When Doing an SSL POST</title>
	<atom:link href="http://bobondevelopment.com/2007/01/16/accepting-a-flaky-certificate-when-doing-an-ssl-post/feed/" rel="self" type="application/rss+xml" />
	<link>http://bobondevelopment.com/2007/01/16/accepting-a-flaky-certificate-when-doing-an-ssl-post/</link>
	<description>Musings on the craft and business of software development</description>
	<pubDate>Wed, 20 Aug 2008 13:35:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Bob</title>
		<link>http://bobondevelopment.com/2007/01/16/accepting-a-flaky-certificate-when-doing-an-ssl-post/#comment-2063</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Thu, 19 Jul 2007 14:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://bobondevelopment.com/?p=19#comment-2063</guid>
		<description>I cant get the ServerCertificateValidationCallback to work. I keep getting "unable to connect to remote host"
The web service has an invalid SSL cert, but I dont care I still want to call the methods on the web service. Here is my code:

ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;

         hew.apshealthcare.healtheweb_test.HealthEWebService webservice = new hew.apshealthcare.healtheweb_test.HealthEWebService();

               

         DataSet ds = webservice.GetEligibleFamilyMembers(this.tbMemberId.Text);
         this.GridView1.DataSource = ds;
         this.GridView1.DataBind();
    }

   

    public static bool ValidateServerCertificate(
      object sender,
      X509Certificate certificate,
      X509Chain chain,
      SslPolicyErrors sslPolicyErrors)
    {
        return true;
       
    }</description>
		<content:encoded><![CDATA[<p>I cant get the ServerCertificateValidationCallback to work. I keep getting &#8220;unable to connect to remote host&#8221;<br />
The web service has an invalid SSL cert, but I dont care I still want to call the methods on the web service. Here is my code:</p>
<p>ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;</p>
<p>         hew.apshealthcare.healtheweb_test.HealthEWebService webservice = new hew.apshealthcare.healtheweb_test.HealthEWebService();</p>
<p>         DataSet ds = webservice.GetEligibleFamilyMembers(this.tbMemberId.Text);<br />
         this.GridView1.DataSource = ds;<br />
         this.GridView1.DataBind();<br />
    }</p>
<p>    public static bool ValidateServerCertificate(<br />
      object sender,<br />
      X509Certificate certificate,<br />
      X509Chain chain,<br />
      SslPolicyErrors sslPolicyErrors)<br />
    {<br />
        return true;</p>
<p>    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mrinal</title>
		<link>http://bobondevelopment.com/2007/01/16/accepting-a-flaky-certificate-when-doing-an-ssl-post/#comment-1872</link>
		<dc:creator>Mrinal</dc:creator>
		<pubDate>Thu, 24 May 2007 22:07:36 +0000</pubDate>
		<guid isPermaLink="false">http://bobondevelopment.com/?p=19#comment-1872</guid>
		<description>I use the code just before calling my web service. It is a c# .Net 2.0 client code that connects to server view web service. When I use a SSL enabled connection from windows XP, the connection goes through. The same code when run on windows Vista throws an exception of type System.Net.WebException. I verified that the WSDL for the web service is accessible from the browser on Vista.

&lt;em&gt;Bob responds: Sounds like you're doing the right things but are running afoul of Vista's tighter security defaults.  I would research Vista system security policies and suspect you'll find that by default it's either impossible to accept an expired cert and/or a cert where the URI does not exactly match the cert; or you can't do it without elevation.  Hopefully this can be configured away at your discretion.  I know for my client's project that prompted this posting, they cannot dictate to their partner for a server-side resolution.  There are times when you implicitly trust the URI and the cert just enables SSL encryption, and isn't really intended to be used for verification of identity.&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>I use the code just before calling my web service. It is a c# .Net 2.0 client code that connects to server view web service. When I use a SSL enabled connection from windows XP, the connection goes through. The same code when run on windows Vista throws an exception of type System.Net.WebException. I verified that the WSDL for the web service is accessible from the browser on Vista.</p>
<p><em>Bob responds: Sounds like you&#8217;re doing the right things but are running afoul of Vista&#8217;s tighter security defaults.  I would research Vista system security policies and suspect you&#8217;ll find that by default it&#8217;s either impossible to accept an expired cert and/or a cert where the URI does not exactly match the cert; or you can&#8217;t do it without elevation.  Hopefully this can be configured away at your discretion.  I know for my client&#8217;s project that prompted this posting, they cannot dictate to their partner for a server-side resolution.  There are times when you implicitly trust the URI and the cert just enables SSL encryption, and isn&#8217;t really intended to be used for verification of identity.</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mrinal</title>
		<link>http://bobondevelopment.com/2007/01/16/accepting-a-flaky-certificate-when-doing-an-ssl-post/#comment-1871</link>
		<dc:creator>Mrinal</dc:creator>
		<pubDate>Thu, 24 May 2007 20:59:54 +0000</pubDate>
		<guid isPermaLink="false">http://bobondevelopment.com/?p=19#comment-1871</guid>
		<description>This does not work on Vista. Would you know the solution that works on Vista?

&lt;em&gt;Bob responds:  Not offhand, but may I ask, what exactly are the symptoms of it not working on Vista?  And can you verify that your implementation of this works correctly on, say, XP?&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>This does not work on Vista. Would you know the solution that works on Vista?</p>
<p><em>Bob responds:  Not offhand, but may I ask, what exactly are the symptoms of it not working on Vista?  And can you verify that your implementation of this works correctly on, say, XP?</em></p>
]]></content:encoded>
	</item>
</channel>
</rss>
