Click here to Skip to main content
15,878,871 members
Home / Discussions / C#
   

C#

 
QuestionServicePointManager.ServerCertificateValidationCallback Pin
himuskanhere15-Jul-09 21:36
himuskanhere15-Jul-09 21:36 
AnswerRe: ServicePointManager.ServerCertificateValidationCallback Pin
jo H20-Jul-09 4:47
jo H20-Jul-09 4:47 
If you are happy to disable the checking of the certificate (not recommended) then use something like

                    ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(
delegate
 {
   return true;
 });


If you are using a WebClient for instance, it should go just before you do the call that will connect (i.e. client.UploadFile(), client.UploadValues(), etc)

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.