PRB: Invalid Certificates Cause RDS ProblemsID: Q193096
|
NOTE: This article assumes that you are familiar with Remote Data Services
(RDS) Visual Basic and Secured Sockets Layer (SSL).
When using Visual Basic and RDS to retrieve data from an SSL Web site, the
following errors may appear:
Internet Client Error.
-or-
The same code may run on a non-SSL Web site or through a SSL Web site using Internet Explorer.Internet Server Error.
An Invalid SSL Certificate, or the certificate causes this problem.
Authority is unknown or not trusted.
Internet Explorer 4.0 passes this problem by displaying the following message
to the user:
If the user selects Yes, RDS functions normally. If the user selects No, the page does not load.The Certificate Issuer for this site is untrusted or unknown. Do you wish to proceed?
Make sure that the server certificate is valid and the certificate authority is
on the list of accepted certificate authorities.
If you are running Internet Explorer 4.0, you may use the following method to verify your certificate authorities.
To check if the certificate authority is trusted, on the Control Panel, select Internet Options. Click the Content tab, and then select Authorities. If your particular Certificate Authority is not listed, you need to obtain and install a valid Site Certificate. Your Certificate Authority should issue this to you. If you do not have this, nor have any means of getting this, you cannot use RDS through Visual Basic. You can still use RDS through Internet Explorer; however every time you visit the SSL Web site, you will be prompted that the certificate authority is not valid, but you will not be allowed to continue.
Setting your security to Low (in Internet Options) will not
prevent the error from occurring.
If you can visit the Web page without being prompted with any dialog boxes,
Visual Basic should be able to make a secure RDS connection.
This behavior is by design.
Option Explicit
Private Sub Form_Load()
Dim DataSpace As Object
Dim DataFactory As Object
Dim SecuredDataFactory As Object
Dim rsData As Object
Set DataSpace = CreateObject("RDS.DataSpace")
Set DataFactory = DataSpace.CreateObject _
("RDSServer.DataFactory", "<LINK TYPE="GENERIC" VALUE="http://localhost")">http://localhost")</LINK>
'This should work when the client certificate is
'installed and running.
Set SecuredDataFactory = DataSpace.CreateObject _
("RDSServer.DataFactory", "https://localhost")
'The DSN should have been installed by MDAC.
'It is a DSN pointing to the Northwind database.
Set rsData = DataFactory.Query _
("DSN=AdvWorks", "SELECT * FROM ORDERS")
Set rsData = SecuredDataFactory.Query _
("DSN=AdvWorks", "SELECT * FROM ORDERS")
End Sub
Internet Client Error.
-or-
Internet Server Error.
http://localhost/CertSrv/CertEnroll/cacerts.htm
For additional information about Installing Certificates, please see the following article(s) in the Microsoft Knowledge Base:
Q171084 How to Install a Certificate
Additional query words: kbRDS kbVBp600 kbRDS150 kbRDS200 kbSecurity kbInternet kbDatabase
Keywords : kbDatabase kbInternet kbRDS kbRDS150 kbRDS200 kbSecurity kbVBp600
Version : WINDOWS:1.5,2.0,5.0,6.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: August 8, 1999