Sample code for 30+ languages & platforms
Classic ASP

Transition from Cert.GetCertChain to Cert.BuildCertChain

Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain.

Chilkat Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0

set cert = Server.CreateObject("Chilkat.Cert")

' ------------------------------------------------------------------------
' The GetCertChain method is deprecated:

' certchainObj is a Chilkat.CertChain
Set certchainObj = cert.GetCertChain()
If (cert.LastMethodSuccess = 0) Then
    Response.Write "<pre>" & Server.HTMLEncode( cert.LastErrorText) & "</pre>"
    Response.End
End If

' ...
' ...

' ------------------------------------------------------------------------
' Do the equivalent using BuildCertChain.
' Your application creates a new, empty CertChain object which is passed 
' in the last argument and filled upon success.

set certchainOut = Server.CreateObject("Chilkat.CertChain")
success = cert.BuildCertChain(certchainOut)
If (success = 0) Then
    Response.Write "<pre>" & Server.HTMLEncode( cert.LastErrorText) & "</pre>"
    Response.End
End If


%>
</body>
</html>