How To Deploy BotDetect ASP Classic CAPTCHA Without Running the Setup Package (BotDetect v3.0; deprecated)

The easiest way to deploy BotDetect Classic ASP Captcha to your servers is to run the setup package, and simply deselect web applications on the feature selection screen (since you probably don't need BotDetect samples on your server).

However, if this is not an option for you, the required files are also included in the Redistribute folder, so you can run the setup package on your development machine, and deploy those files manually after uploading them to your server(s).

Please Note

BotDetect ASP component deployment requires administrative privileges on the server either way – both the setup package and the manual registration procedure have to make system modifications that simply can't be done with a limited user account.

The manual deployment procedure involves several steps:

Furthermore, if you're updating BotDetect to a newer (3.x) version, you'll have to first remove the old BotDetect Captcha component version before registering the new one.

Add the BotDetect COM Captcha assembly to the .NET GAC

The BotDetect COM Captcha component is implemented as a .NET 2.0 assembly, and to make it globally accessible on your server it has to be added to the .NET Global Assembly Cache.

  • From the Control Panel, choose Administrative Tools > Microsoft .NET Framework 2.0 Configuration > Manage the Assembly Cache > Add an Assembly to the Assembly Cache
  • Browse to where you uploaded the BotDetect Captcha COM assembly: BotDetect.COM.dll.

Alternatively, if you have the .NET 2.0 SDK on the server, you can also use the command line gacutil utility, for example:

"C:\Program Files\Microsoft Visual Studio 8\Sdk\v2.0\bin\gacutil.exe" 
  /nologo /if BotDetect.COM.dll

Register the BotDetect COM interface in the Windows Registry

BotDetect COM functionality needs to be available to ASP (and potentially, other COM clients) through the BotDetect.Captcha.3 ProgId.

This can be done using the regasm utility coming with the .NET framework, running the following command line:

%WINDIR%\Microsoft.Net\Framework\v2.0.50727\RegAsm.exe 
  BotDetect.COM.dll /nologo /tlb:BotDetect.COM.tlb /verbose 
  > regasm.log

We redirected the registration output from the command line to the regasm.log file, so in case you encounter any difficulties running this command, you can send us the resulting log to help troubleshooting.

Make BotDetect Sound Packages Accessible to Your Applications

Since BotDetect Captcha sound packages are read by the COM component from the file-system during ASP application execution, the IIS worker process running the ASP application pool must have read rights to the sound package folder.

Depending on your OS and IIS version and system configuration, different user accounts might be involved. Considering that BotDetect sound packages are simple sound data containers, it's possible to grant all users generic read permissions on them, by running:

cacls BotDetectSounds /G "Users":R /E /C /T

Of course, you can also give read permissions only to those user accounts which will be running the actual ASP applications using BotDetect Captcha.

You will also have to configure your ASP applications using BotDetect to read sound packages from the folder you uploaded them to. You can do this by editing the BotDetect\CaptchaConfig.asp file in the Captcha library copies included in your applications.

For example, if you uploaded the sound packages to C:\Websites\BotDetectSounds, you would specify:
LBD_Configuration_SoundPackageFolder = "C:\Websites\BotDetectSounds"

Remove Old BotDetect CAPTCHA Component Versions

If you're upgrading BotDetect Captcha on your server from version 3.0.0 to 3.0.1, for example, you'll first have to remove the old version before registering the new one.

If the websites currently using the old BotDetect version are running, you'll have to temporarily stop IIS to make it release old .dll handles.

Then you undo the deployment steps in reverse, first unregistering the BotDetect COM interface, and afterwards removing the old assembly from the GAC.

This could all be accomplished from the command line, by running for example:
net stop w3svc
	
%WINDIR%\Microsoft.Net\Framework\v2.0.50727\RegAsm.exe 
  BotDetect.COM.dll /u /nologo /tlb:BotDetect.COM.tlb /verbose

"C:\Program Files\Microsoft Visual Studio 8\Sdk\v2.0\bin\gacutil.exe" 
  /uf BotDetect.COM.dll /nologo 

net start w3svc

You could also remove the old assembly from the GAC using the Control Panel GAC management tool, if you used that to add it.


Please Note

The information on this page is out of date and applies to a deprecated version of BotDetect™ CAPTCHA (v3.0).

An up-to-date equivalent page for the latest BotDetect Captcha release (v4) is BotDetect v4 Captcha documentation index.

General information about the major improvements in the current BotDetect release can be found at the What's New in BotDetect v4.0 page.