License Verification

Though the user registration program verifies a license before installing it, you can check the license status of AspTear using three samples: VerifyLicense.asp, VerifyLicense.vbs and VerifyLicense.xls. Their code is very similar, and below you can see the ASP version of license verification.

<%  @LANGUAGE=VBSCRIPT %>
<%  Option Explicit %>
<!--
Written by: Christoph Wille
Last updated: 5/22/2001
-->
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
   <TITLE>License Check with ASP</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<%
On Error Resume Next
Dim xObj, strLicensee

Set xObj = Server.CreateObject("SOFTWING.ASPtear")
If Err.Number <> 0 Then
   Response.Write "AspTear is not installed correctly on your machine. "
   Response.Write "CreateObject returned the following error: "
   Response.Write "<strong>" & Err.Number & ", " & Err.Description & "</strong>"
Else
   If xObj.IsLicensed Then
     strLicensee = xObj.Licensee
     Response.Write "This copy of AspTear is licensed to: " & strLicensee
   Else
     Response.Write "Your copy of AspTear is not licensed (eval copy/incorrect license key)"
   End If
End If
%>

</BODY>
</HTML>