Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

SSL certificate error

Posted on 2012-04-09
1
382 Views
Last Modified: 2012-04-11
I developed a tool to download files from sharepoint documnet Lib to server file location that use SSL(https).I cam up with error and I found the solution related to certificate policy
http://support.microsoft.com/kb/823177/ 

Looks like version different .I cant use the code below.


THis is my class
----------------------------------------------------------------------------------------------
Imports System.Net
Imports System.Security.Cryptography.X509Certificates
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 to force the certificate to be accepted.
    Return True
  End Function
End Class

-------------------------------------------------------------------------------------

This is the code i am using code before web service call.

System.Net.ServicePointManager.CertificatePolicy = New MyPolicy()


My Issue:

when i use the code line above It is saying
'System.Net.ServicePointManager.CertificatePolicy' is obsolete , please use ServerCertificateValidationCallback.

I search on the net but nothing stright forward.
Anyone come across same issue.




I am using VS 2008
0
Comment
Question by:goodgeek
1 Comment
 
LVL 10

Accepted Solution

by:
Najam Uddin earned 500 total points
ID: 37831024
This solution is not good to use in production environment. This code bypass validation of certificate. I would suggest to create certificate as described in following link
http://msdn.microsoft.com/en-us/library/ff648498.aspx.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In previous Articles, we have discussed how we can upload a file using .asmx web service and isolated storage space. Here, in continuation to the topic, I am going to discuss how we can use WCF for the same purpose. Steps: 1.Create the silverli…
Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question