ServerObjects Logo


AspConv 1.x

About AspConv

AspConv is a component in the AspLib series. This component comes packaged with other components of the AspLib series. The components are not available for purchase seperately. AspConv provides access to commonly needed conversion functions including:

  1. Base64 encoding and decoding of files and strings
  2. UUEncoding and decoding of files
  3. HTML encoding and decoding of strings
  4. Conversion of common MIME type descriptions and extensions

AspConv Installation

To use this ASP component move the DLL into a subdirectory (like \winnt\system32 for NT or \windows\system for Win95).

To register the component on the system change to the directory where you installed the DLL and type:

regsvr32 AspConv.dll

Simple Example

The following code demonstrates how to use AspConv from VBScript to determine if a file exists or not.


Set ConvObj = Server.CreateObject("AspConv.Expert")
strEncValue = ConvObj.URLDecode("this%20string%20was%67e(n)coded")

About purchasing AspLib

  1. Licenses are per server CPU. The product is available for purchase from http://www.serverobjects.com/products.htm.

About Upgrades

  1. Users can upgrade for free for minor version changes. For example, upgrades from version 1.00 to 1.99 are free. The upgrade from 1.99 to 2.0 may carry an additional license fee.

How to get upgrades

  1. The latest version of the components are always available at http://www.serverobjects.com/products.htm. If a fee is associated with obtaining the upgrade it will be noted on that page.

Upgrade Instructions

To upgrade the component from a previous version please follow these steps:

  1. Stop all IIS related services or any process that has the component in use.
  2. Change to the directory where the component is located and type "regsvr32 /u AspConv.dll"
  3. Move the new copy of AspConv.dll to the current directory and type "regsvr32 AspConv.dll"
  4. Restart IIS

Common Problems

Server object error 80040154.
This is the most common error reported. The error means that ASP could not create the object. Causes include:

  1. You never ran regsvr32 on the DLL. See installation section of this document.
  2. You registered the DLL with regsvr32 in one subdirectory and moved it to another.
  3. IIS does not have proper security permissions to access the DLL or the directory you installed it to. See the ASP FAQ (http://www.signmeup.com/faq/) for information on changing security.
  4. Your server may be running low on memory.
  5. Your evaluation copy has expired. If you purchased the product be sure you followed directions to install your product key.

Note: Some users have reported that restarting the server after registering the DLL was required to use the component. This should not be necessary but reportedly works in a few cases.

Server object error 'ASP 0177:800401f3'.
This error means "Invalid class string" -- in other words the call to CreateObject failed because the name object cannot be found by the OLE sub-system. Causes include:

  1. You really didn't run regsvr32 on the server after all.
  2. You ran regsvr32 but it reported an error.
  3. Someone modified security on part of the registry that's preventing the OLE subsystem from reading all or part of the HKEY_CLASSES_ROOT tree.
  4. The name of the object you are trying to create was mispelled or is incorrect.

Technical Support

If you require technical support please see our tech support page at http://www.serverobjects.com/support.htm

AspConv Component Properties

Property Description
InputFileName For file conversions this property should be set to the complete path and filename of the input file.
OutputFileName For file conversions this property should be set to the filename of the new file you want created. Be sure that if a multi-user situation can occur that either unique filenames or unique paths are used.
OutputPath For file conversions this property should be set to the path where the new file should be placed. Be sure that if a multi-user situation can occur that either unique filenames or unique paths are used.

AspConv Component Methods

Method Parameters Return Value Description
HTMLDecode strIn string Decodes strIn looking for any escaped HTML characters and converts them to literals.

Example:

strOut = ConvObj.HTMLDecode("coding & testing")

HTMLEncode strIn string Encodes strIn looking for any literals that should be encoded and converts them to HTML characters.
URLDecode strIn string Takes an URL encoded value (strIn) and translates it back into literal characters.
URLEncode strIn string Takes strIn and creates a valid URL string.
Base64DecodeStr strIn string Takes a Base64 encoded string and decodes the string returning the unencoded value.
Base64EncodeStr strIn string Encodes strIn using Base64.
Base64DecodeFile N/A boolean Decodes a file (see AspConv properties) using Base64.
Base64EncodeFile N/A boolean Encodes a file (see AspConv properties) using Base64.
UUDecodeFile N/A boolean Decodes a file (see AspConv properties) using UUDecoding.
UUEncodeFile N/A boolean Encodes a file (see AspConv properties) using UUEncoding.
GetMIMEDesc strMimeType string Returns the MIME description for a given MimeType.
GetMIMEExt strMimeType string Returns the file extension for a given MimeType.
GetMIMEType strFileName string Returns the MimeType for a given filename.

 

Copyright © 1997, 1998, 1999, 2000 by ServerObjects Inc. All Rights Reserved.