It is important to realise that an ActiveX control such as csXImage must run in Windows and the only browser which currently supports these controls is Microsoft Internet Explorer. The operating system of the server is not relevant.
We have a separate page covering these issues - HERE. That page includes essential information on how to place the Licence Package File on the server so that each client can run the control at run time using the design time licence that is on the server. It also describes how to call the csXImage control using an <object> tag, which requires a different class ID depending on whether it is the full or trial version.
Some of the common mistakes which prevent csXImage from running in a browser are as follows:
1. Not following the instructions described in the link above. The Licence Package File must be present on the server and the <object> tag which calls it must be before the <object> tag which creates the csXImage instance.
Here is a repeat of the HTML code used to call up the .lpk file:
<param name="LPKPath" value="... relative path to .lpk file ...">
This is using a DLL which is installed as part of Windows called the Licence Manager and it has its own class ID and one parameter called LPKPath which points to the .lpk file. Do not confuse this class ID with the class ID used by the csXImage control and do not attempt to include the LPKPath inside the object tag for the csXImage control.
Another potential error with LPK files arises because the LPK file must be created wih the same version of the ActiveX control which uses it. We now provide the LPK file with the csXImage installation to make it easier to use. If you ever update the version of csXImage you must also replace the LPK file. You can create your own LPK file using the LPK File Generation Tool but this works with the registered version of the ActiveX control on the machine that runs the Tool, so you must make sure that the control on the web site is the same as the registered version.
Object doesn't support this property or method
This is the same error that is shown when the object has not been instantiated and can lead to a long search for an error in the wrong place.
Some examples of methods and properties and the correct use of brackets are as follows (we will assume that a csXImage object has been created called csxi).
CurrentDevice = csxi.CurrentTwainDevice;
SelectTwainDevice is a method and so it requires brackets, CurrentTwainDevice is a property and so must not have brackets after it.
3. Nesting the object tag inside a form tag. If the object tag which calls the csXImage object is nested inside a form tag, the syntax is changed and the csXImage object must be called as a sub property of the form.
csxi.ColorFormat = 0;
csxi.style.width = 300;
csxi.style.height = 200;
6. Case sensitivity on Linux/UNIX servers. The OCX or CAB file and the LPK file must have the same case sensitivity as the names and paths inside the object tags, on a Linux or Unix server. If there is a difference the control will not load. This is not relevant on Windows servers because these are not case sensitive.
If our installer has been run on the client machine it will have copied the OCX file and the licence file to that machine and registered the csXImage control. This prevents the need for the LPK file, and the control is not downloaded by the browser when the page is first loaded. This means that many of the problems related to deploying from a remote server, such as the licensing issues and the security settings in the browser, will not apply. It is therefore important to test the application in a real deployment situation at some point and we would recommend that anyone thinking of buying the full version of csXImage makes the appropriate tests with the trial version first.
There are no restrictions on our trial version but with the full version it might be against our licence terms to make multiple installations using our installer as it copies the licence file each time it runs.
© Chestysoft, 2017.