BotDetect ASP Classic CAPTCHA Web API Reference (BotDetect ASP v4.x; discontinued)
To make Captcha integration into ASP Classic applications easy, the BotDetect ASP Captcha component wraps the basic Captcha functionality implemented in the Captcha COM component with a simple ASP Classic Captcha library. This library is focused on ease of use from Classic ASP applications, and includes a number of .asp files with VbScript classes and helper declarations.
BotDetect\CaptchaIncludes.asp
The BotDetect\CaptchaIncludes.asp
file includes the VbScript Captcha
, CaptchaCode
and BDC_CaptchaConfiguration
class declarations, and some helper functions. These classes and functions are at the core of the BotDetect ASP Captcha Library.
Instances of the Captcha
type can be created on your ASP forms and will take care of Captcha display and validation.
BotDetect\CaptchaIncludes.asp Captcha Class Reference | ||
---|---|---|
Default Function Init
|
Instead of using the constructor, Captcha objects should always be created using the default Init function, which takes the Captcha identifier (a string) as parameter and automatically initializes the instance identifier. |
|
Default Function Init
|
The same function can also be used to create a This is used to reference data for a previous object instance, for example when generating Captcha images and sounds in the This "overload" of the |
|
Property Get CaptchaID | Unique identifier of the Captcha object within the application (for example, if you placed one Captcha object on the Registration page and another on the Contact Us page, they would have distinct CaptchaId values). | |
Property Get InstanceID | Globally unique identifier of the current Captcha object instance, used to ensure each page load keeps separate Captcha codes, for example when opening the same form in multiple browser tabs. | |
Property Get/Let UserInputID | Captcha user input textbox identifier used for all server-side and client-side user input processing. The default value is empty (must be set for each Captcha individually). Valid user Captcha user input id setting values are strings corresponding to the Html identifier of the Captcha code input control on the form. Each Captcha instance should have an associated user input control. | |
Property Get/Let CodeLength | Number of characters in randomly generated Captcha codes (answers to Captcha challenges). The default value is random (4-6 characters). | |
Property Get/Let CodeStyle | Character types used to generate random Captcha codes. The default value is Alphanumeric. |
|
Property Get/Let CodeStyleName | String representation of the Captcha This value is converted to its numerical representation before it's actually used, so the string property is just a helper to make your ASP code more readable. |
|
Property Get/Let DisallowedCodeSubstrings | Strings that should never occur in randomly generated Captcha codes. Can be both single characters (allows Captcha character set customization) and sequences of two or more characters (useful for swear words filtering, avoiding particular hard-to-read sequences etc.). The default value is empty (Captcha code filtering is optional). |
|
Property Get/Let CodeTimeout | The time period after random Captcha code generation during which Captcha challenges based on it can be solved: when it expires, even correct inputs will be considered as invalid submissions. The default value is 1200 seconds (20 minutes). | |
Property Get/Let ImageStyle | The BotDetect drawing algorithm used to render Captcha codes in image Captcha challenges.The default value is random (an image style is chosen from all available values for each Captcha image generated). |
|
Property Get/Let ImageStyleName | String representation of the Captcha image style, i.e. the algorithm used to render Captcha codes in images. This value is converted to its numerical representation before it's actually used, so the string property is just a helper to make your ASP code more readable. |
|
Property Get/Let ImageWidth | Width of the generate Captcha image, in pixels; the default Captcha image width is 250 px. | |
Property Get/Let ImageHeight | Height of the generate Captcha image, in pixels; the default Captcha image height is 50 px. | |
Property Get/Let ImageFormat | Image format in which Captcha images will be generated and sent to the client. The default value is Jpeg. |
|
Property Get/Let ImageFormatName | String representation of the This value is converted to its numerical representation before it's actually used, so the string property is just a helper to make your ASP code more readable. |
|
Property Get/Let CustomDarkColor | Optional custom dark color point, modifies the color palette used for Captcha image drawing. Should be a Html color, i.e. specified either by name ("Red" ) or hex value ("#f00" or "#ff0000" ) |
|
Property Get/Let CustomLightColor | Optional custom light color point, modifies the color palette used for Captcha image drawing. Should be a Html color, i.e. specified either by name ("Red" ) or hex value ("#f00" or "#ff0000" ) |
|
Property Get/Let SoundEnabled | Are Captcha sounds enabled. |
|
Property Get/Let SoundStyle | Numeric representation of the Captcha sound style, i.e. the algorithm used to pronounce Captcha codes in sounds; the default sound style is 0. This value is persisted if needed and directly propagated to the COM Captcha component interface. |
|
Property Get/Let SoundStyleName | String representation of the Captcha This value is converted to its numerical representation before it's actually used, so the string property is just a helper to make your ASP code more readable. |
|
Property Get/Let SoundFormat | Numeric representation of the audio format in which the Captcha sound file will be generated; the default format is 0 This value is persisted if needed and directly propagated to the COM Captcha component interface. |
|
Property Get/Let SoundFormatName | String representation of the This value is converted to its numerical representation before it's actually used, so the string property is just a helper to make your ASP code more readable. |
|
Property Get/Let SoundStartDelay | Starting delay (in milliseconds) of Captcha audio JavaScript playback. The default value is 0 (no delay). |
|
Property Get/Let SoundRegenerationMode | Numeric representation of the sound regeneration mode determining how will multiple consecutive requests for audio Captcha with the same Captcha code be handled by BotDetect; the default mode is 1. This value is persisted if needed and directly propagated to the COM Captcha component interface. |
|
Property Get/Let SoundRegenerationModeName | String representation of the This value is converted to its numerical representation before it's actually used, so the string property is just a helper to make your ASP code more readable. |
|
Property Get/Let Locale | Locale string, affects the character set used for Captcha code generation and the pronunciation language used for Captcha sound generation | |
Property Get/Let ImageTooltip | The alternative text of the Captcha image Html element. The default value is "Retype the CAPTCHA code from the image". |
|
Property Get/Let SoundTooltip | Tooltip of the Captcha sound icon. |
|
Property Get/Let ReloadTooltip | Tooltip of the Captcha reload icon. |
|
Property Get/Let HelpLinkText | Text or tooltip of the Captcha help link, depending on help link mode. The default value depends on the width of the Captcha image. |
|
Property Get/Let HelpLinkUrl | Url of the localized Captcha help page the help link points to. The default value depends on Captcha locale. |
|
Property Get/Let ReloadEnabled | Is Captcha reloading enabled. |
|
Property Get/Let UseSmallIcons | Default BotDetect Captcha icons are 22x22 pixels large, but there is also a smaller set of 17x17 px icons used when the default ones are too large. This settings allows you to control which icon set will be used. The default value is true when the Captcha image height is < 50px, and false otherwise. |
|
Property Get/Let UseHorizontalIcons | BotDetect displays the Captcha sound and reload icon one below the other by default, and switches to displaying them one beside the other when Captcha images are small enough. This setting allows you to control which BotDetect icon layout will be used. The default value is true when the Captcha image height is <40px, and false otherwise. |
|
Property Get/Let SoundIconUrl | Url of the icon used for Captcha sound playback. |
|
Property Get/Let ReloadIconUrl | Url of the icon used for Captcha reloading. |
|
Property Get/Let IconsDivWidth | Custom width of the Captcha icons div element. The default value depends on Captcha image height, since BotDetect will automatically determine default icon size and position to match it. |
|
Property Get/Let HelpLinkEnabled | Will Captcha markup include a link to a Captcha help page providing Captcha instructions and explanations for form users. The default value is true. |
|
Property Get/Let HelpLinkMode | How will the Captcha help link be displayed. The default value is Text. |
|
Property Get/Let TabIndex | Starting tabindex for the Captcha control Html output. The keyboard-selectable Captcha markup elements are: the Captcha reload icon, the Captcha sound icon, and (only in the Free version of BotDetect) the BotDetect website link. Depending on your settings (is Captcha reloading enabled, are Captcha sounds enabled) and the version of BotDetect you are using (free or paid), the next available tabindex on the page can be from 0 to 3 greater than this value. |
|
Property Get/Let AdditionalCssClasses | User-defined CSS classes that will be added to the BotDetect CAPTCHA container <div >.The default value is empty. |
|
Property Get/Let AdditionalInlineCss | User-defined CSS style declarations that will be added as inline style of the BotDetect CAPTCHA container <div >. The default value is empty. |
|
Property Get/Let AddScriptInclude | Should the BotDetect JavaScript client-side script code be included by the generated Captcha container markup. The default value is true. |
|
Property Get/Let AddInitScript | Should the JavaScript code for BotDetect client-side object creation be included in the generated Captcha container markup. The default value is true. |
|
Property Get/Let AutoUppercaseInput | Should user Captcha code input be automatically uppercased on the fly. The default value is true. |
|
Property Get/Let AutoFocusInput | Should the Captcha code input textbox automatically be assigned focus on all Captcha sound and Captcha reload icon clicks, allowing the users to more easily type in the code as they hear it or as the new image loads. The default value is true. |
|
Property Get/Let AutoClearInput | Should the Captcha user input textbox automatically be cleared on all reload icon clicks and auto-reloads of expired Captcha codes. The default value is true. |
|
Property Get/Let AutoReloadExpiredCaptchas | Should Captcha challenges automatically be reloaded when the Captcha code expires (controlled by the CodeTimeout property). The default value is true. |
|
Property Get/Let AutoReloadTimeout | Time period in seconds after which automatic reloading of expired Captcha challenges will cease. The default value is 7200 seconds (2 hours). |
|
Property Get/Let RemoteScriptEnabled | Should BotDetect also add a remote JavaScript include (remote.captcha.com/include.js) loaded from the captcha.com server (which is currently used only for stats, but is planned to develop into additional Captcha functionality). The default value is true. |
|
Property Get IsSolved | Has the current |
|
Sub Reset | Resets the IsSolved status of the current Captcha object instance. |
|
Sub Save | This subroutine saves the Captcha object instance state into ASP Session state, if needed (if the instance data is different from the application defaults defined in the CaptchaConfig.asp file). |
|
Sub SaveCaptchaCode
|
Saves the given Captcha code value in ASP Session state. | |
Sub DeleteCaptchaCode
|
Deletes the Captcha code associated with the given instance identifier. | |
Function LoadCaptchaCode
|
Loads the saved Captcha code associated with the given instance identifier. | |
Function Validate | Validate the Captcha code user input, relying on automatic instance identifier propagation through a hidden field, and the user input identifier set through the Used by default, if you're simply using the out-of-the-box |
|
Function ValidateInstance
|
Validate the Captcha code user input for the explicitly stated instance identifier and user input value. Used for Classic ASP Captcha customizations you might make. | |
Function AjaxValidate
|
Validate the Captcha code user input for the explicitly stated instance identifier and user input value. Used for BotDetect built-in Ajax Captcha validation. | |
Function GenerateImage | Generate the Captcha image, using the settings configured in the current Captcha object instance. |
|
Function GenerateSound | Generate the Captcha sound, using the settings configured in the current Captcha object instance. |
|
Property Get ImageMimeType | Image format MIME type for the currently configured image format. |
|
Property Get SoundMimeType | Sound format MIME type for the currently configured sound format. |
|
Property Get SoundFilename | Sound file name for the current sound format and instance identifier. |
|
Property Get IsFree | License helper, telling whether the Captcha COM component instance is created by the free BotDetect version. Used to check whether to display the example project Free version information or not. |
|
Property Get IsSoundAvailable | Is the BotDetect pronunciation sound package for the currently used locale available in the specified sound packages folder. |
|
Property Get ControlInfo | Debugging helper, returning the assembly version of the Captcha COM component. |
|
Function Html | Generates the Html markup needed to add the current Captcha object instance to an ASP form. |
|
Function Info | Generates debugging info about the current Captcha object instance. |
Instances of the BDC_CaptchaConfiguration
type are used internally by the BotDetect Classic ASP Captcha Library.
BotDetect\CaptchaIncludes.asp Captcha BDC_CaptchaConfiguration Reference | ||
---|---|---|
Function IsValidCodeLength
|
Valid user Captcha code length setting values are integers larger than 0 and smaller than 16. |
|
Function IsValidCodeStyle
|
Valid user Captcha code style setting values are members of the BotDetect CodeStyle enumeration (Alpha, Numeric, or Alphanumeric). |
|
Function IsValidDisallowedCodeSubstrings
|
Valid user disallowed Captcha code substring setting values are lists of arbitrary strings, in CSV format. Whitespace is ignored, and disallowed substrings are not case-sensitive (because Captcha codes are case-insensitive as well). |
|
Function IsValidCodeTimeout
|
Valid user Captcha code timeout setting values are integers larger than 30 and smaller than 7200 (i.e. between half a minute and 2 hours). |
|
Function IsValidImageStyle
|
Valid user Captcha image style setting values are members of the BotDetect ImageStyle enumeration. Please note that some image styles are restricted to paid versionss of BotDetect, and will be ignored in free version implementations. |
|
Function IsValidImageWidth
|
Valid user Captcha image size setting values are integers: widths can be between 20 and 500 pixels. |
|
Function IsValidImageHeight
|
Valid user Captcha image size setting values are integers: heights between 20 and 200 pixels. |
|
Function IsValidImageFormat
|
Valid user Captcha image format setting values are members of the BotDetect ImageFormat enumeration (Jpeg, Png, Gif). |
|
Function IsValidCustomDarkColor
|
Validates the given string custom dark color value, checking that it's not an empty string. The Classic ASP Captcha library doesn't check that the given value is a valid Html color value, but the underlying COM implementation will throw an error if an invalid value is specified. |
|
Function IsValidCustomLightColorValid
|
Validates the given string custom light color value, checking that it's not an empty string. The Classic ASP Captcha library doesn't check that the given value is a valid Html color value, but the underlying COM implementation will throw an error if an invalid value is specified. |
|
Function IsValidSoundStyle
|
Validates the given numeric sound style value, checking that it's a number between 0 and 9. |
|
Function IsValidSoundFormat
|
Validates the given numeric sound format value, checking that it's a number between 0 and 1. |
|
Function IsValidSoundStartDelay
|
Valid user Captcha sound start delay setting values are positive integers. |
|
Function IsValidSoundRegenerationMode
|
Validates the given numeric sound regeneration mode value, checking that it's a number between 0 and 2. |
|
Function IsValidLocale
|
Validates the given Locale string, checking it's not empty or too short to be a valid locale specification. Since the locale strings supported by BotDetect will change depending on the underlying COM component version and sound package files available, this function doesn't perform any comprehensive locale checks. |
|
Function IsValidHelpLinkEnabled
|
Valid user help link enabled setting values are booleans. |
|
Function IsValidHelpLinkMode
|
Valid user Captcha help link mode setting values are members of the BotDetect HelpLinkMode enumeration ("Image" or "Text"). |
Instances of the CaptchaCode
type are used internally by the BotDetect Classic ASP Captcha Library.
BotDetect\CaptchaIncludes.asp CaptchaCode Class Reference | ||
---|---|---|
Default Function Init
|
Instead of using the constructor, CaptchaCode objects should always be created using the default Init function, which takes the Captcha code string and initializes the object fields. |
|
Property Get Code | Returns the contained Captcha code string. |
|
Property Get ElapsedSeconds | Calculates how many seconds have elapsed since the |
|
Property Get/Let GenerationTime | The |
The CaptchaIncludes.asp
file also includes some helper functions related to the Captcha randomization functionality.
BotDetect\CaptchaIncludes.asp Randomization Functions Reference | ||
---|---|---|
Function BDC_RandomCodeStyle | Returns a Captcha |
|
Function BDC_RandomCodeStyleFrom
|
Returns a Captcha |
|
Function BDC_RandomImageStyle | Returns a Captcha |
|
Function BDC_RandomImageStyleFrom
|
Returns a Captcha |
|
Function BDC_RandomSoundStyle | Returns a Captcha |
|
Function BDC_RandomSoundStyleFrom
|
Returns a Captcha |
BotDetect\CaptchaIncludes.asp Utility Reference | ||
---|---|---|
BDC_CodeStyleNames | A VbScript Array, containing all BotDetect code style names. String values are mapped by their numeric equivalents as indexes, so you can get a code style name by passing the numeric value as array index. E.g. BDC_CodeStyleNames(0) = "Alphanumeric". |
|
BDC_CodeStyles | A VbScript Dictionary, containing all BotDetect code style numeric values. Numeric values are mapped by their (case-insensitive) string equivalents as keys, so you can get a code style numeric value by passing the string name as dictionary key. E.g. BDC_CodeStyles("Alphanumeric") = 0. |
|
BDC_ImageStyleNames | A VbScript Array, containing all BotDetect image style names. String values are mapped by their numeric equivalents as indexes, so you can get an image style name by passing the numeric value as array index. E.g. BDC_ImageStyleNames(31) = "Chess". |
|
BDC_ImageStyles | A VbScript Dictionary, containing all BotDetect image style numeric values. Numeric values are mapped by their (case-insensitive) string equivalents as keys, so you can get an image style numeric value by passing the string name as dictionary key. E.g. BDC_ImageStyles("Chalkboard") = 31. |
|
BDC_ImageFormatNames | A VbScript Array, containing all BotDetect image format names. String values are mapped by their numeric equivalents as indexes, so you can get an image format name by passing the numeric value as array index. E.g. BDC_ImageFormatNames(0) = "JPEG". |
|
BDC_ImageFormats | A VbScript Dictionary, containing all BotDetect image format numeric values. Numeric values are mapped by their (case-insensitive) string equivalents as keys, so you can get an image format numeric value by passing the string name as dictionary key. E.g. BDC_ImageFormats("Jpeg") = 0. |
|
BDC_SoundStyleNames | A VbScript Array, containing all BotDetect sound style names. String values are mapped by their numeric equivalents as indexes, so you can get a sound style name by passing the numeric value as array index. E.g. BDC_SoundStyleNames(0) = "Dispatch". |
|
BDC_SoundStyles | A VbScript Dictionary, containing all BotDetect sound style numeric values. Numeric values are mapped by their (case-insensitive) string equivalents as keys, so you can get a sound style numeric value by passing the string name as dictionary key. E.g. BDC_SoundStyles("Dispatch") = 0. |
|
BDC_SoundFormatNames | A VbScript Array, containing all BotDetect sound format names. String values are mapped by their numeric equivalents as indexes, so you can get a sound format name by passing the numeric value as array index. E.g. BDC_SoundFormatNames(0) = "WavPcm16bit8kHzMono". |
|
BDC_SoundRegenerationModes | A VbScript Dictionary, containing all BotDetect sound regeneration mode numeric values. Numeric values are mapped by their (case-insensitive) string equivalents as keys, so you can get a sound regeneration mode numeric value by passing the string name as dictionary key. E.g. BDC_SoundRegenerationModes( "None") = 0. |
|
BDC_SoundRegenerationModeNames | A VbScript Array, containing all BotDetect sound regeneration mode names. String values are mapped by their numeric equivalents as indexes, so you can get a sound regeneration mode name by passing the numeric value as array index. E.g. BDC_SoundRegenerationModeNames(0) = "None". |
|
BDC_SoundFormats | A VbScript Dictionary, containing all BotDetect sound format numeric values. Numeric values are mapped by their (case-insensitive) string equivalents as keys, so you can get a sound format numeric value by passing the string name as dictionary key. E.g. BDC_SoundFormats( "WavPcm16bit8kHzMono") = 0. |
|
BDC_HelpLinkModeNames | A VbScript Array, containing all BotDetect help link mode names. String values are mapped by their numeric equivalents as indexes, so you can get a sound format name by passing the numeric value as array index. E.g. BDC_HelpLinkModeNames(0) = "Image". |
|
BDC_HelpLinkModes | A VbScript Dictionary, containing all BotDetect help link mode numeric values. Numeric values are mapped by their (case-insensitive) string equivalents as keys, so you can get a sound format numeric value by passing the string name as dictionary key. E.g. BDC_HelpLinkModes("Image") = 0. |
|
Function BDC_Timestamp | Creates a simple timestamp string based on the current date and time, e.g. on the 21st of September at 13:45:27 it would return |
|
Function BDC_FormattedDate
|
Formats the given date/time value in the |
|
Function BDC_Now | Automatically uses the |
|
Function BDC_Asciify
|
Replaces all non-Ascii characters in the given string with |
|
Function BDC_Normalize
|
Removes all non-word (word characters = alphanumeric Ascii + underscore) characters from the given string. |
|
Function BDC_RemoveWhitespace
|
Removes all whitespace chars from the given string. |
|
Function BDC_CreateGuid | Creates a new GUID value, formatted as a continuous string (e.g. |
|
Function BDC_DictionaryFromArray
|
Given an array of values, converts it to a VbScript Dictionary, with the array values becoming dictionary keys and array indexes becoming dictionary values. In other words, it reverses the array |
|
Function BDC_RandomFromRange
|
Returns a random integer from the numeric range defined by the given (inclusive) lower and upper bound. E.g. |
|
Function BDC_RandomFromValues
|
Returns a random value from the given VbScript Array. E.g. |
|
Function BDC_ScriptName | Name of the currently executing script file, e.g. returns |
|
Function BDC_AppName | Name of the next-to-last path fragment for the currently executing script file, e.g. returns |
|
Function BDC_IsLocalRequest | ||
Function BDC_GetAspCode
|
||
Function BDC_ExecuteIfExists
|
CaptchaConfig.asp
The CaptchaConfig.asp
file contains the application default values used by the ASP Captcha library. You can modify various Captcha parameters simply by editing the values from this file in your Classic ASP websites.
You can see how some non-default values were set in this file in the Captcha Application Config Settings classic ASP code example.
BotDetect.CodeLength = BDC_RandomFromRange(3, 5) | Number of characters in randomly generated Captcha codes (answers to Captcha challenges). |
|
BotDetect.CodeStyle = BDC_CodeStyles("Alpha") | Captcha code style (alphanumeric, alpha, or numeric). |
|
BotDetect.DisallowedCodeSubstrings = "d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w" | Strings that should never occur in randomly generated Captcha codes. Can be both single characters (allows Captcha character set customization) and sequences of two or more characters (useful for swear words filtering, avoiding particular hard-to-read sequences etc.). |
|
BotDetect.CodeTimeout = 600 | Captcha code timeout in seconds - the Captcha can only be successfully solved within the specified time after generation. This is an optional security improvement that narrows the window of opportunity for attacks based on re-using the Captcha image on another site controlled by the attacker, or similar human-solver-based attacks on Captcha-protected forms. |
|
BotDetect.TestModeEnabled = False | Application configuration switch to use if you want to run automated tests that need to be able to submit a Captcha-protected form in QA environments. |
|
BotDetect.ImageStyle = BDC_RandomImageStyleFrom(imageStyleNames) | The BotDetect drawing algorithm used to render Captcha codes in image Captcha challenges. |
|
BotDetect.ImageWidth = 200 | Captcha image width, in pixels. |
|
BotDetect.ImageHeight = 50 | Captcha image height, in pixels. |
|
BotDetect.ImageFormat = BDC_ImageFormats("PNG") | Captcha image output format (JPG, GIF, PNG or BMP). |
|
BotDetect.CustomDarkColor = "#483d8b" | Used to override the default Captcha image color scheme. Html named or hex color value of the dark color used in Captcha images. |
|
BotDetect.CustomLightColor = "#87cefa" | Used to override the default Captcha image color scheme. Html named or hex color value of the light color used in Captcha images. |
|
BotDetect.DisabledImageStyles = "Chipped,Lego,Wave" | Application configuration setting that allows centralized temporary disabling of individual BotDetect image styles if there is ever an urgent issue that requires it. |
|
BotDetect.SoundEnabled = True | Is Captcha sound enabled. |
|
BotDetect.SoundStyle = BDC_RandomSoundStyleFrom(soundStyleNames) | Captcha sound style - can be a fixed or a randomized value selected from the 10 BotDetect sound generation algorithms. |
|
BotDetect.SoundFormat = BDC_SoundFormats("WavPcm8bit8kHzMono") | Captcha sound output format (WavPcm16bit8KhzMono or WavPcm8bit8KhzMono). |
|
BotDetect.SoundRegenerationMode = BDC_SoundRegenerationModes("None") | How will multiple consecutive requests for audio Captcha with the same Captcha code ("sound regeneration") be handled by BotDetect - a trade-off of security, usability, and storage requirements. |
|
BotDetect.SoundPackagesFolder = "C:\Program Files (x86)\BotDetect 4 CAPTCHA Component\Asp\Redistribute\BotDetectSounds" | Custom sound packages folder. You can reuse a single location for all ASP applications using BotDetect Captcha on the same server, as long as the IIS worker process running them had Read permissions to the location. |
|
BotDetect.WarnAboutMissingSoundPackages = False | If the required SoundPackage in not deployed, the sound icon is not clickable and displays a warning tooltip by default. If you want to disable this warning and simply not display the sound Captcha icon at all for locales whose pronunciations are not deployed with the application, set this property to "False". |
|
BotDetect.DisabledSoundStyles = "RedAlert,HiveMind" | Application configuration setting that allows centralized temporary disabling of individual BotDetect sound styles if there is ever an urgent issue that requires i. |
|
BotDetect.Locale = "en-US" | Captcha locale string, affecting the charset used for Captcha code generation, and the pronunciation language used for sound Captchas. |
|
BotDetect.ImageTooltip = "Custom Captcha image tooltip" | Custom Captcha image alt text / title. |
|
BotDetect.SoundTooltip = "Custom Captcha sound icon tooltip" | Custom sound Captcha icon alt text / title. |
|
BotDetect.ReloadTooltip = "Custom Captcha reload icon tooltip" | Custom reload Captcha icon alt text / title. |
|
BotDetect.HelpLinkText = "Custom Captcha help link text" | Text used in the Captcha help link; leave empty for default image width-dependent text. |
|
BotDetect.HelpLinkUrl = "custom-captcha-help-page.html" | Url to which the Captcha help link points to. |
|
BotDetect.ReloadEnabled = False | Is Captcha reloading enabled. |
|
BotDetect.UseSmallIcons = False | Default BotDetect Captcha icons are 22x22 pixels large, but there is also a smaller set of 17x17 px icons used when the default ones are too large. This settings allows you to control which icon set will be used. |
|
BotDetect.UseHorizontalIcons = False | BotDetect displays the Captcha sound and reload icon one below the other by default, and switches to displaying them one beside the other when Captcha images are small enough. This setting allows you to control which BotDetect icon layout will be used. |
|
BotDetect.SoundIconUrl = "custom-sound-icon.gif" | Custom sound Captcha icon. You can use standard BotDetect icons ("BotDetect\SoundIcon.gif" and "BotDetect\SmallSoundIcon.gif") or an icon of your own. |
|
BotDetect.ReloadIconUrl = "BotDetect/Public/bdc-reload-icon.gif" | Custom reload Captcha icon. You can use standard BotDetect icons ("BotDetect\ReloadIcon.gif" and "BotDetect\SmallReloadIcon.gif") or an icon of your own. |
|
BotDetect.IconsDivWidth = 25 | Custom width of the Captcha icons div element. |
|
BotDetect.HelpLinkEnabled = True | Is the Captcha help link enabled or not. |
|
BotDetect.HelpLinkMode = BDC_HelpLinkModes("Text") | Controls how the Captcha help link is displayed; supported modes are |
|
BotDetect.AdditionalCssClasses = "class1 class2 class3" | User-defined CSS classes that will be added to the BotDetect CAPTCHA container <div >. |
|
BotDetect.AdditionalInlineCss = "border: 4px solid #fff; background-color: #f8f8f8;" | User-defined CSS style declarations that will be added as inline style of the BotDetect CAPTCHA container <div >. |
|
BotDetect.AddInitScript = True | Should the JavaScript code for BotDetect client-side object creation be included in the generated Captcha container markup. |
|
BotDetect.AddScriptInclude = False | Should the BotDetect JavaScript client-side script code be included by the generated Captcha container markup. |
|
BotDetect.AutoUppercaseInput = True | Anything the users type in the input textbox will be uppercased on the fly, since Captcha validation is not and should not be case-sensitive. This is a small usability improvement that helps communicate that fact to the users clearly. |
|
BotDetect.AutoFocusInput = True | The input textbox will be assigned focus on all Captcha Sound and Captcha Reload icon clicks, allowing the users to more easily type in the code as they hear it or as the new image loads. This does not apply to auto-reloading of expired Captchas, since the user might be filling out another field on the form when the auto-reload starts and shouldn't be distracted. |
|
BotDetect.AutoClearInput = True | The input textbox will be cleared on all Reload icon clicks and auto-reloads, since any previous input in the textbox will be invalidated by Captcha reloading. This is a small usability improvement that helps users avoid having to delete the previous input themselves. |
|
BotDetect.AutoReloadExpiredCaptchas = True | Captcha images are automatically reloaded when the Captcha code expires (as set in the BDC_Configuration_CodeTimeout element, or the ASP Session timeout), but only within a certain interval from their first generation. This allows you to have a short Captcha code timeout (e.g. 2 minutes) to narrow the window of opportunity for Captcha reusing on other sites or human-solver-powered bots, and actual visitors can still fill out your form at their own pace and without rushing (since the Captcha image will be reloaded automatically when it is no longer valid). |
|
BotDetect.AutoReloadTimeout = 3600 | Since we don't want infinite sessions when the user leaves the form open in a background browser tab over the weekend (for example), we set a reasonable upper limit on the auto-reload period (e.g. 2 hours = 7200 seconds). |
|
BotDetect.SoundStartDelay = 1000 | Captcha sound JavaScript playback starting delay, in milliseconds. |
|
BotDetect.RemoteScriptEnabled = True | By default, BotDetect also adds a remote JavaScript include loaded from the captcha.com server, which is currently used only for stats, but is planned to develop into additional Captcha functionality. This include can be disabled using this configuration property. |
|
BDC_Configuration_ CustomCharset = "" | Defines a custom character set for Captcha code generation, specifying the alphanumeric characters which will be used for all Captcha codes regardless of the code style value set. |
|
Set BotDetect.Persistence = Session | By default, BotDetect stores generated Captcha codes and per-instance set values in ASP Session state. If you want to change the persistence medium and use your own dictionary-type object, this is the setting to use. |
|
BotDetect.UseApplicationStorageFallback = True | Controls whether data required for sound Captcha playback will also be saved in ASP Application state, as a fallback for ASP Session state problems. Several browser/sound player combinations cause sound problems since they misplace ASP Session cookies when transferring the sound Url to the sound player (IE 7.0 + WMP 11, Safari 4 + QuickTime, etc.). Keeping this option set to |
Please Note
The information on this page applies to a discontinued version of BotDetect™ ASP CAPTCHA (v4.x)
Current BotDetect Versions
-
BotDetect ASP.NET CAPTCHA
2019-07-22v4.4.2 -
BotDetect Java CAPTCHA
2019-07-22v4.0.Beta3.7 -
BotDetect PHP CAPTCHA
2019-07-22v4.2.5