I have created a ActiveX control that opens up an Imanage document with given input parameters. I have generated an exe, installed the ActiveX control and it appears in the programs and features list, which implies that it has installed correctly.
The issue I am having is that when I run the below html file from my C drive, it works fine and as expected.
So I tried creating an empty web application and included the same html file in there.
I have then set the application to build from local iis (http://localhost/test) but when I run it I hit the exception with undefined as the ex.description.
<!DOCTYPE>
<html>
<head>
<title>GDSImanageControl webpage</title>
</head>
<body>
<OBJECT id="Control" classid="clsid:45D313BC-8E30-46BD-88D2-6D47FE316B14" codebase="GdsImanageControl.cab"></OBJECT>
<script type="text/javascript">
try {
var obj = document.Control;
if (obj) {
obj.openImanageDoc("docNo", "versionNo", "server", "database", isReadOnly);
} else {
alert("Object is not created!");
}
} catch (ex) {
alert("Some error happens, error message is: " + ex.Description);
}
</script>
I have tried setting the platform target to x86, Registering for COM Interop and Enabled 32-Bit Applications (App Pool).
Any help on this issue is greatly appreciated
I Had implemeted the IObjectSafetyImplementation incorrectly. I followed the Further Modification section of this tutorial.