mhinze.com archive

this is an archive of the old blog, ended 6/16/08




    Archive for March, 2007

    links for 2007-03-24

    Saturday, March 24th, 2007

    maximize your roi with del.icio.us spam

    Friday, March 23rd, 2007

    did i say spam?  sorry, i meant trusted, targeted marketing messages delivered automatically.

    Continue Reading »

    links for 2007-03-23

    Friday, March 23rd, 2007

    links for 2007-03-22

    Thursday, March 22nd, 2007

    links for 2007-03-21

    Wednesday, March 21st, 2007

    links for 2007-03-20

    Tuesday, March 20th, 2007

    consuming web services / crafting webrequests using ssl where the cert is expired or otherwise hosed

    Monday, March 19th, 2007

    with 1.1, we'd do this:

     

    internal class AcceptAllCertificatePolicy : System.Net.ICertificatePolicy
    {
        public bool CheckValidationResult(System.Net.ServicePoint sPoint,
            System.Security.Cryptography.X509Certificates.X509Certificate cert, System.Net.WebRequest wRequest,int certProb)
        {
            return true;
        }
    }//acceptallcertificatepolicy

     

    and then in the consumer

    System.Net.ServicePointManager.CertificatePolicy = new AcceptAllCertificatePolicy();

     

    but try this in 2.0 and you get a warning:

    System.Net.ServicePointManager.CertificatePolicy' is obsolete: 'CertificatePolicy is obsoleted for this type, please use ServerCertificateValidationCallback instead.

    we don't have to implement ICertificatePolicy any longer.  and we can use anonymous delegates to craft a better solution:

    System.Net.ServicePointManager.ServerCertificateValidationCallback +=
        delegate(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate,
                                System.Security.Cryptography.X509Certificates.X509Chain chain,
                                System.Net.Security.SslPolicyErrors sslPolicyErrors)
            {
                return true;
            };

    links for 2007-03-19

    Monday, March 19th, 2007

    links for 2007-03-17

    Saturday, March 17th, 2007

    links for 2007-03-16

    Friday, March 16th, 2007
    © 2007 mhinze.com