On Nov 8, 2007 9:10 PM, Aida I.  Rivera-Benítez, MSMIS <[EMAIL PROTECTED]> 
wrote:
> Well ...I have my webservices and they are almost working but...
> still have the certificate problem when sending the actual file
> It says the "SSL Certificate common name (home name field) is
> Incorrect".
>
> They send me the following code to bypass the certificate apparently
> In Visual Basic.
>
> Create a class like the following:
> Public Class MyPolicy
> Implements ICertificatePolicy
> Public Function CheckValidationResult(ByVal srvPoint As ServicePoint, _
> ByVal cert As X509Certificate, ByVal request As WebRequest, _
> ByVal certificateProblem As Integer) _
> As Boolean Implements ICertificatePolicy.CheckValidationResult
> Return True
> End Function
> End Class
>
> When you proceed to call the web service, before creating the web reference
> instance,
> Create an instance of the web reference, create an intance of the class:
> System.Net.ServicePointManager.CertificatePolicy = New MyPolicy
> And then proceed to use the web service.
>
> I tried to translate this to VFP but is giving errors everywhere.
> Can somebody help me with this code?
>
Here is the C# version which is much easier to see what is going on.
 public class MyPolicy : ICertificatePolicy
 {
     public bool ICertificatePolicy.CheckValidationResult(ServicePoint
srvPoint, X509Certificate cert, WebRequest request, int
certificateProblem)
     {
         return true;
     }
 }

Unfortunately this is all .NET classes that VFP can't interact with in
native VFP.   Maybe Sedna but I don't have any hands on with that.


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to