The XEncrypt ActiveX control resides in the same DLL as the rest of the
AspEncrypt objects, aspencrypt.dll. To use XEncrypt on the client side,
your web page must reference it using the <OBJECT> tag, as follows:
<OBJECT
CLASSID="CLSID:F9463571-87CB-4A90-A1AC-2284B7F5AF4E"
CODEBASE="aspencrypt.dll"
ID="XEncrypt">
</OBJECT>
The CLASSID attribute is the globally unique identifier (GUID) of the XEncrypt control.
The CODEBASE attribute points to a relative path of the file aspencrypt.dll
on your server. For this code to work, you must place the file
aspencrypt.dll in a virtual directory on your web server where
the browser can find and download it from. Note that you do not need to
register aspencrypt.dll in that location. Your web server may have
the file aspencrypt.dll registered in, say, the system folder c:\windows\system32,
and another copy of that file placed in the same virtual directory as the HTML or ASP
files that reference it.
The IE browser keeps cached copies of all ActiveX controls it has downloaded and installed in the past. This way it does not have to re-download and
reinstall a control every time a page hosting this control is viewed by the user.
However, if a new version of the control DLL file is placed on the server, if is necessary to force IE to download and
reinstall this new version. This is achieved by appending a #VERSION=... keyword to the name of the DLL file in the CODEBASE attribute, as follows:
<OBJECT
CLASSID="CLSID:F9463571-87CB-4A90-A1AC-2284B7F5AF4E"
CODEBASE="aspencrypt.dll#VERSION=2,9,0,0"
ID="XEncrypt">
</OBJECT>
The ID attribute is to be used by client-side scripts to
reference the XEncrypt control (see code samples below).
AspEncrypt is a digitally signed DLL, so when your users run this page
for the first time, they will see a message at the top of the page similar to this:
and after that, a dialog box similar to this:
If the user chooses "Install", the browser will download and register
the file aspencrypt.dll on the user's machine. The AspEncrypt library is signed
with Persits Software, Inc.'s digital ID. If you want your company's name
to appear on this security dialog and not Persits Software, Inc., contact us
and we will send you an unsigned copy of the DLL. You can then sign it using your own digital ID.