简体   繁体   English

从本地主机无法调用ActiveX控件的HTML TestPage

[英]HTML TestPage that calls a ActiveX control doesn't work from localhost

I have created a ActiveX control that opens up an Imanage document with given input parameters. 我创建了一个ActiveX控件,该控件使用给定的输入参数打开Imanage文档。 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. 我生成了一个exe,安装了ActiveX控件,它出现在程序和功能列表中,这意味着它已正确安装。

The issue I am having is that when I run the below html file from my C drive, it works fine and as expected. 我遇到的问题是,当我从C驱动器运行以下html文件时,它工作正常且符合预期。

So I tried creating an empty web application and included the same html file in there. 因此,我尝试创建一个空的Web应用程序,并在其中包含相同的html文件。

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. 然后,我将应用程序设置为从本地iis( http:// localhost / test )构建,但是在运行该应用程序时,我遇到了未定义为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). 我尝试将平台目标设置为x86,注册COM互操作和已启用的32位应用程序(应用程序池)。

Any help on this issue is greatly appreciated 对此问题的任何帮助将不胜感激

I Had implemeted the IObjectSafetyImplementation incorrectly. 我错误地实现了IObjectSafetyImplementation。 I followed the Further Modification section of this tutorial . 我遵循了本教程的“进一步修改”部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM