This page is intended to help answer questions which may arise from using our components. There is a section for each component with some general questions at the beginning and questions about ActiveX controls, ASP.NET controls and web hosting at the end. If you cannot find an answer here or in the component instructions, contact us and we will try to help.
1. Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed ...Invalid ProgID.
There are two main reasons for this error, either the component is not registered or the ProgID is misspelled. For more on DLL registration Click Here. The ProgID is the parameter used by Server.CreateObject( ). Note that our trial versions have a different ProgID from the full versions and they always contain the word "Trial". Read the component instructions for full details.
A less common reason for the error is if the Internet Guest User does not have permission to read the registry. Registry permissions can be checked and edited using the regedt32.exe utility, which can be opened from the Run box in the Start Menu. The component details will be shown under HKEY_CLASSES_ROOT and the permission settnigs can be viewed or adjusted through the Security heading in the drop down menu. Usually these registry keys allow the Everyone group to read but sometimes restrictions might have been added, possibly only to applying to new entries. This can result in new components apparently failing to register properly and they continue to produce the above error. For ASP components, the Internet Guest User must have read permission on the appropriate registry entries.
The Internet Guest User Account (IUSR_machine_name) does not have adequate permissions on the component DLL. Set the permission on the file to include Read and Execute.
3. Server object, ASP 0177 (0x8007007E)
This error is usally caused if a component DLL has been moved or deleted after registration. To resolve it, register the component again. To prevent it, avoid moving or deleting component files without unregistering them first.
4. What other permissions should be set on the server?
As mentioned above, the Internet Guest User Account must have Read and Execute on the component DLL. For any component that is reading a file, IUSR_machine_name must have read permission for that file. If the component is creating a file or writing to a database, IUSR_machine_name must have write permission for the appropriate directory. If files are being deleted it will need Modify permission.
5. How long will the trial version run?
All our trial ASP components are set to expire on a specific date, usually the end of a month. To find the expiry date you can read the Version property. For example, with csImageFile the following 2 line script displays the version and expiry date:
Set Obj = Server.CreateObject("csImageFileTrial.Manage")
Response.Write Obj.Version
Our ActiveX controls csXImage, csXGraph and csXMultiUpload are not time limited and do not expire. csXPostUpload is date limited and the expiry date is shown in the About box.
6. The trial has expired. Can I download another trial component?
Yes. We want you to be sure the component is what you want before you buy it so you can replace your trial copy with a later one if you need to.
7. Do I need to unregister the trial version before using the full version?
No. The full version of each component is a separate DLL file and full versions and trials do not interfere with each other. If you want to keep your system registry tidy you should "unregister" the trial using Regsvr32 with the /u switch, or use our own utility DllRegSvr, before deleting the trial DLL.
8. Can I upgrade a Single Server Licence to a Multiple Server Licence?
Yes. The price we charge is just the difference between the two licence types. Follow this link for more.
9. Can I upgrade to a later version of a component if one is available?
For most components the latest versions are available to existing users. After buying a component you are sent a download link and an access code. If you are entitled to an upgrade that link will still be valid. If you have lost the download details, contact us and provide some identification, preferably the email address you used when making the purchase, and we will send them out again.
For csImageFile there is a charge to upgrade to Version 6 of the component. Click for details.
10. How do I access files across a network?
A number of our components allow you to read or write files by specifying a full physical path. If the file is on a remote machine you can use the shared path (e.g. "Z:\path\to\file.ext") or the UNC path (e.g. "\\computername\sharename\path\to\file.ext"). Under default conditions the component will not have permission to do this but you can create a COM+ Application in Component Services and run the component under a named Windows account.
11. Do your ASP components run on the 64 bit (x64) versions of Windows?
Yes they do, but it requires some configuration on the server. Our components are all 32 bit and a 32 bit DLL cannot be called from a 64 bit application, and IIS is a 64 bit application. The solution is to create a COM+ Application in Component Services and add the component to this. The COM+ Application acts as a bridge between the 64 bit IIS and the 32 bit DLL allowing them to work together.
A quick alternative is to run the site in 32 bit mode.
This could be caused by the component not being registered, for more on registration Click Here. It could be caused by an error in the Cold Fusion configuration and there is a description of how to solve it on the Macromedia web site.
1. Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method:...
This error can mean that you have attempted to use a property or method that is not supported, or that you have misspelled a command. It also arises when an equals sign is missed when setting a property value. Here is some correct VBScript syntax:
Image.TextSize = 12
Image.TextColor = "ff0000"
Image.Text 10, 10, "Use an equals sign when setting properties"
This is really a general ASP component question but it is most frequently asked by csImageFile users, often when drawing text.
2. No image is displayed, only an "empty image" marker.
There is probably an error in your image creation script. Debugging is difficult if you view the web page that contains the <img> tags. If you enter the URL of the image creation script into the browser, complete with any URL parameters, you should see any error messages that were generated. This makes debugging easier.
3. How can I pass information to the image creation script?
The two main ways of doing this are as URL parameters and by using session variables. Session variables should be treated with caution because if the script that reads the variable does so before the script that sets the variable has executed there will be an error. URL parameters are probably more reliable, and here is an example:
<img src="image.asp?ID=3">
The image creation script can then read the value using Request.QueryString("ID").
4. What factors affect the quality when resizing and scaling images?
The standard result of a Resize or Scale operation should be of adequate quality when running on Windows 2000 (or ME), but the quality can be reduced on Windows NT (or 95/98). If you have an older version of csImageFile (before 22/11/02) you may experience lower quality resizes with some colour depth configurations of Windows 2000. This can be resolved by using the current version. An image with smoother edges can be produced by setting the Resample property to true. The FilterType property changes the filter used during resampling.
5. Merging images with a transparent foreground gives poor results with JPG images.
When you specify the transparent colour, it is a specific RGB value. A JPG image may appear to have a continuous background colour, but on closer inspection it will be a range of RGB values so only some of the pixels will be transparent. As a solution make the foreground image a PNG or BMP and make sure the background is all the same colour.
6. How do I resize an image to fit a maximum height or width?
csImageFile has a command called ResizeFit which takes the maximum width and height as parameters and resizes the image to fit these dimensions while maintaining aspect ratio. It will not increase the image size if the image already fits inside the area specified. There is a downloadable example - Here.
7. csImageFile cannot use a font that has been installed on the server.
If a font is installed by a user who is logged on to the server using Terminal Services the font will not be available to csImageFile until the server is rebooted. This does not apply if the font is installed by a user logged onto the server directly.
8. What causes "Out of Memory" or "Out of System Resources" errors?
There can be several variations of this error message and it can be caused for a wide variety of reasons. In short, it means that there is not enough memory (RAM) available for csImageFile to complete the current command. If the current image is very large and the server has a limited amount of RAM, it might simply have run out of memory, especially if another application is using a large amount of memory. If there is memory available on the server that does not appear to get used, there could be another cause of the error.
When running Cold Fusion, if the Java Memory Heap size is set too large it will restrict the amount of memory that csImageFile can use. Reducing the heap size can often fix this error.
In other IIS applications such as ASP the memory errors can be caused by certain types of antivirus and spyware protection software. At the moment we have limited information on this problem but we are aware that some security software appears to restrict the amount of memory that the DLLHost.exe process can use, and this is the process that runs components such as csImageFile, resulting in an inability to work with very large images where up to 100 MB of RAM may be required.
Does the graphics card have any effect on image processing?
The server graphics card is used for image resizing and in font smoothing (antialiasing). When a low specification card is used it can restrict the maximum image size that can be processed. Images that are too big for the graphics card to resize will appear cropped when reduced, or a smaller copy of the image will be shown at the top left of a plain background when the image is enlarged.
Font smoothing is rarely a problem as this is usually supported by even the lowest specification graphics devices.
1. How do I read form variables when uploading a file?
The Request.Form method of reading a file cannot be used when the form is sent using the encoding enctype="multipart/form-data". Instead the csASPUpload component provides some methods which can be used. If the object is called "Upload" and the form variable is called "Name", Upload.Value("Name") returns the value. See the component instructions for full details.
2. Can I read QueryString variables when uploading a file?
Yes, if parameters are added to the URL inside the "post" attribute they can be read in the usual way with Request.QueryString.
Yes, the important point is to use the correct data type for the binary field. Access can store binary data in a field of type "OLE Object". In SQL Server the equivalent data type is "Image".
In MySQL the data type is "BLOB" although by default a BLOB field is restricted to 64 KB. MEDIUMBLOB is 16 MB and LONGBLOB is 4 GB. A BLOB can also be set to a specified length when the column is defined. The maximum size of file that can be added to a BLOB field in MySQL is also restricted by the max_allowed_packet setting in the my.ini file.
4. Can any type of file be uploaded?
Yes, the csASPUpload component does not open the file, it just extracts it and allows you to save it or stream it. The type of file is not important.
5. When images are uploaded can the image be previewed first?
Sometimes. We have an example of using Javascript to preview an image but it will not work with Firefox / Netscape. It works by loading the file into a Javascript image object. Since writing this example, Internet Explorer 7 was released and this cannot preview the image either, so the example is very limited. Click Here to view the example.
We have an ActiveX control, csXImage which can be used to select and display an image in the browser and then upload this image to the server. This allows the image to be previewed and also edited before uploading. For a downloadable example - Click Here.
When csASPUpload was upgraded to version 1.2 we removed the maximum upload size limit, and the corresponding MaxKB property. We also removed a command called Read that set all the properties. If your object is called Upload, add the following lines:
Upload.MaxKB = 1024 'or some other value up to 6144
Upload.Read
These lines can be used safely with the later version of the component, which will ignore them without generating an error.
7. On Windows 2003 Server and later operating systems, files above a certain size fail to upload.
I Windows 2003 Server there is a setting in the metabase.xml file which limits the size of a POST operation and it defaults to 200 KB. Find the line AspMaxRequestEntityAllowed and set the value to something large enough. It is measured in bytes. Remember to restart IIS for the settings to take effect.
In Windows 2008 Server (and Vista) this setting may be called "Maximum Requesting Entity Body Limit" and it can be set directly in IIS under ASP Behaviour.
1. Can I display more than one graph on a page?
Yes. Each graph needs its own script to generate it, called inside a <img> tag, but any number of <img> tags can be included on the page.
2. How can I show decimals on the y-axis?
The Decimals property determines how many decimal places are used when displaying values. It defaults to zero so you must set a value to display decimals. Setting Decimals to a negative number fixes the number of decimal places so that trailing zeros will be shown. For example Decimals = -2 may be used to display money values where two decimal places are required.
3. Can I use csDrawGraph with a database?
Yes, but there are no built in functions to link to a database. If a database is open with a recordset called RSet and it has 3 data fields, Data1, Data2 and Data3 the AddData commands might look like this:
Chart.AddData "A", CInt(RSet("Data1")), "ff0000"
Chart.AddData "B", CInt(RSet("Data2")), "00ff00"
Chart.AddData "C", CInt(RSet("Data3")), "0000ff"
The function CInt( ) or CDbl( ) must be used to prevent a type mismatch error. We have a downloadable example that uses an Access database. Click here for more.
4. I am using Visual Interdev and the graphs are not displaying in the previews?
This usually happens if debugging is switched on because that makes ASP run in a single thread. To display a graph embedded in a web page two scripts must run simultaneously. You can turn debugging off in IIS under Home Directory -> Configuration -> App Debugging and clearing the Debugging Flags checkboxes.
5. The browser is caching the image and not showing the correct graph.
The following line should stop Internet Explorer from caching an ASP page:
Response.Expires = 0
Netscape may cache dynamically generated images if they have the same URL. This can be prevented by adding a unique parameter to the end of the URL. For example:
<img src="graph.asp?<%= Server.URLEncode(Now) %>">
This creates a string from the current date and time, so the URL will be slightly different and Netscape will recognise it as a separate image each time.
6. How do I produce graphs that are bigger or smaller than the default 400 x 300?
There are a number of properties that you will need to adjust. Height and Width control the size of the image but do not affect the graph features or their position. For a pie chart CentreX and CentreY control to position of the pie and PieDia defines the size of the pie. For bar charts and line graphs OriginX and OriginY position the origin. MaxX and MaxY specify the length of the axes. For all graphs the legend is positioned by LegendX and LegendY and ShowLegend can be set to false to hide it competely. Refer to the instructions for full details of all the properties.
1. I don't want the browser to open the document. Can I force the Save As prompt to appear?
It depends on the browser. Netscape / Firefox will always open the document if it can. In Internet Explorer the Save As dialogue box will appear if the file is specified as an attachment. If the StreamFile command is used in csFileDownload the following code can be used:
Download.Attachment = true
Download.StreamFile
2. Can multiple files be downloaded at once from a single request?
No. The script that controls a download sends data to the browser as a header followed by the file. It is not possible to add a second file to the end of the first.
3. What special permissions must be set to run csFileDownload?
The Internet Guest User (IUSR_Machine_Name) must have Read permission on the file that is to be downloaded. This file will normally be on a part of the server that is not "Web Shared" so that it cannot be downloaded by typing a URL into the browser, but the Internet Guest User must be able to read it if csFileDownload is to send it to the browser.
1. Can the OCX file be distributed "royalty free"?
The .ocx file for the control can be distributed royalty free but the licence file (extension .lic) cannot be distributed.
In a compiled application where an executable file is produced (such as Visual Basic or Delphi) the licensing is quite simple. Each developer using the control at design time needs a copy of the .lic file and so depending on the number of developers the single user, 5 user or site licence is required.
When the control is used client side in a web browser application the .lic file remains on the server and is packed into a Licence Package File (.lpk). See the answer to question 2 below for more details on this. The number of servers that can have the control installed determines whether the single user, 5 user or site licence is required. ("Site" means company location not web site in this context). The .ocx file can be supplied to each client and there is no restriction on the number of clients.
Note that the trial version also has a .lic file so any deployment can be tested at the trial stage.
2. How are the controls used in a client side web application?
We have a separate page to answer this. One for csXImage and another for csXGraph.
3. Do you have a licence type that allows for a web application to be distributed?
The advertised licence types do not allow for a web application to be distributed and at least a single user licence would be required for each server running the application. Contact us for details of a fixed fee distribution licence that will allow you to install your applications on a number of different servers belonging to different clients.
4. Are any dependent files required?
No, our OCX controls do not rely on any dependent files such as DLLs in order to run. There is a potential problem with newly installed Windows 95 and 98 systems because a later version of OLEAUT32.DLL is required. Often this file gets updated as software is installed on the system, for example by upgrading Internet Explorer. One method of forcing the update of this DLL is to install the VB 6 Runtime files.
5. Are digitally signed CAB files available for any of the ActiveX controls?
We provide signed CAB files for the full versions of csXImage, csXGraph and csXMultiUpload. We do not provide a signed CAB file for csXPostUpload because the functionality of this control allows the web developer to upload and delete files without the end user's knowledge, which means it is not "safe".
6. Deploying an application in .NET results in a 80040112 error.
This error is caused when a licensed ActiveX control is created dynamically at run time in a .NET application. The licence information must be added as described on the following page: http://support.microsoft.com/kb/326651
Note that the licence key is the content of the .lic file supplied with the control.
This seems to be an error specific to Access applications where copied controls take the same height and width as the original. Do not use the clipboard to copy and paste ActiveX controls in Access.
8. Do your ActiveX controls work in 64 bit environments?.
Our controls are all 32 bit and must run inside 32 bit applications but these applications will run on 64 bit operating systems. It is important that the OCX file is not stored in the Windows\System32 folder on 64 bit operating systems because this folder is now reserved for 64 bit files and the control will not register from this location. This may affect the installation software that can be used to deploy the application.
In Visual Studio .NET applications the application must be compiled specifically for 32 bit. In the Solution Explorer select Properties and on the Build tab select "x86" under Platform Target. For an existing project that has already been built, use the CorFlags.exe utility to force it to load as 32 bit. This only needs to be run once.
corflags.exe /32BIT+ testme.exe
This will force the application called testme.exe to load as 32 bit.
1. GetSelectionCoords does not work in Visual Foxpro / Javascript / VBScript.
Some languages cannot use ActiveX functions with variable parameters, such as GetSelectionCoords. We have added 4 extra read only properties to return the selection coordinates as an alternative. These are called SelectionX1, SelectionY1, SelectionX2 and SelectionY2. Here is a code example for Visual Foxpro:
LOCAL x1, y1, x2, y2 as long
thisform.olecontrol1.MouseSelectRectangle()
thisform.olecontrol1.UseSelection = .t.
x1 = thisform.olecontrol1.SelectionX1
y1 = thisform.olecontrol1.SelectionY1
x2 = thisform.olecontrol1.SelectionX2
y2 = thisform.olecontrol1.SelectionY2
.
.
RETURN
2. The onAcquire event does not fire in Visual Foxpro.
This is usually caused when the WaitForAcquire property is set to true, which is the default value. When using Visual Foxpro in an application that uses the OnAcquire event, always set WaitForAcquire to false.
3. How do I transfer images to and from a Visual Basic PictureBox?
There are two commands available for this. To copy an image from a PictureBox into csXImage use the BMPHandle property:
ImageBox1.BMPHandle = Picture1.Image.Handle
This will copy the entire contents of the PictureBox, including any empty space if the image is smaller than the PictureBox. To copy the contents of csXImage to a PictureBox use the Picture property:
Picture1.Picture = ImageBox1.Picture
The Picture property can only be used to export from csXImage, not the other way round.
4. What is WIA, and can csXImage be used with WIA?
WIA stands for Windows Image Acquisition and is an alternative standard for acquiring images from scanners and cameras. It has been introduced by Microsoft and is available in Windows XP. WIA device drivers are able to communicate with applications that are TWAIN-compliant, such as csXImage, however these drivers usually exhibit limitations in their functionality. We do not recommend the use of WIA drivers with csXImage. The standard, TWAIN-compliant drivers which are readily available for the vast majority of scanners should be used instead.
Versions of Visual Studio 2005 or later may raise an error "LoaderLock was detected" when attempting to run any TWAIN related functions. This is due to an external library (TWAIN_32.DLL) being accessed. To prevent this error go to the Debug menu in Visual Studio, select Debug/Exceptions, then under Managed Debugging Assistants, uncheck LoaderLock in the Thrown column.
1. What versions of the .NET Framework are supported?
Our components are written for Version 1.1 of the .NET Framework. They will also work with Version 2.0. They are not compatible with the Compact Framework.
1. Do you provide web hosting?
We do have some ASP enabled web hosting available on our server where our components are installed. Click here for more details.
2. Will you install other third party components?
If you require any special configuration, including the registration of components, ask us about it and we will consider it. We only provide small scale hosting but we aim to be flexible if we can do so without affecting performance for other hosted sites.
© Chestysoft, 2010.