On this page we will try to address some of the more common reasons for the component failing to work correctly.
The DLL must be "registered" on the server before a script is able to call it. On a server, or local PC, that you have full access to registration is easily achieved using the command line utility REGSVR32.EXE. We also provide a free DLL registration tool that uses a Windows interface. After registration the class name, class ID and DLL location are all recorded in the registry allowing the system to load the component when given the class name. DO NOT move or rename the DLL after registration. Remember to "Unregister" the component before deleting the DLL file. On a server administered by another company the server administrator will need to register the DLL.
Calling an ASP component that is not registered usually gives the error: "Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed ...Invalid ProgID."
For the component to be called from an ASP or other script running on the web server the Internet Guest User account (IUSR or IUSR_machine_name) must have Read and Execute permission on the DLL file itself.
Insufficient permissions on the DLL file can lead to the error: "Server object error 'ASP 0178 : 80070005' Server.CreateObject Access Error The call to Server.CreateObject failed while checking permissions. Access is denied to this object."
Note that if you get the permission related ASP 0178 error the component has been registered successfully. The registration details allow your system to find the component but the permission must be correct for the system to run the component.
In order to work with files on the server the Internet Guest User account must have appropriate permissions. Read for reading a file, Write for saving a file and Modify for overwriting an existing file.
csImageFile will run in the Windows operating systems from XP through to Windows 8 for desktops and 2003 Server through to 2012 Server for servers. There are some minor differences regarding registration in the later systems, Vista, Windows 7 and Windows 2008 Server onwards. In these systems registration must be done as an adminstrator so either run the command prompt as an administrator before using regsvr32.exe or run our DLLRegSvr tool as an administrator.
On the 64 bit versions of Windows, do not put a 32 bit DLL in the Windows\System32 folder. If running a 32 bit component on a 64 bit system either run the web site in 32 bit mode or create a COM+ Application to run the component in 64 bit mode.
From version 8.0 csImageFile is available as a 64 bit component.
The local Internet Guest User account does not have authority to access network drives. If csImageFile needs to be used to read or write from a network drive it must be added to a COM+ Application in Component Services (found in "Administrative Tools"). The COM+ Application allows the component to run as a specified Windows user or it can be set to use the NETWORK SERVICE account.
The trial and full versions of csImageFile are distributed as two different files with different class names. The trial is called "csImageFileTrial.dll" and it is called using Server.CreateObject("csImageFileTrial.Manage"). The full version is called "csImageFile.Manage" and it is called using Server.CreateObject("csImageFile.Manage"). The trial version is fully functional up until the expiry date after which it can no longer be used to create or read images, although it can still be called and some utility functions still work. To find the expiry date, read the Version property:
Set Image = Server.CreateObject("csImageFileTrial.Manage")
It is possible to replace an old trial version with a newer DLL if more time is needed for evaluation. Simply overwrite the old DLL with the newer copy and no registering or unregistering is necessary. If an access denied error is generated when deleting the old file the web server must be stopped and the "Web Application" unloaded. Exactly how you unload the component can vary depending on your system. In IIS 6 and earlier there is a button marked "Unload" on the Home Directory tab and this will release any components from memory. In IIS 7 you can restart the Application Pool. If you are running the component through Component Services you can stop and start the COM+ Application.
When upgrading to the full version remember to change the Server.CreateObject commands in each script using the component.
All the paths used for reading and writing files are full physical paths, not relative paths. If the physical path is not known, use Server.MapPath to find it. Alternatively, use csImageFile's CurrentDir and ParentDir functions.
Sometimes an application can be running smoothly and then fail when it is moved to a new server. In this case, points 1 to 4 above should be checked. The paths to any input or output files should also be checked in case they are different and scripts are looking in the wrong places for files.
© Chestysoft, 2017.