My MFC activeX control works fine when run from disk, but I encounter errors when hosting it on a server. Client: Windows 7 machine Server: Ubuntu running Apache
Below is the HTML code along with the encountered errors. Any advice would be much appreciated. Thank you, Nahum
HTML:
<html>
<HEAD>
<TITLE>myFirstOCX.CAB</TITLE>
<script type="text/javascript" FOR="window">
function fn()
{
try{
document.all('Ctrl1').AboutBox();//error: object doesn't support propert
//or method AboutBox()
//OR
var obj = new ActiveXObject ("activex.activexCtrl");
obj.AboutBox ();//error: Automation server can't create object
}
catch (ex) { alert("Error: " + ex.message); }
}
</script>
</HEAD>
<body bgcolor=lightblue >
<TABLE BORDER>
<TR>
<TD><OBJECT
CLASSID="CLSID:E228C560-FA68-48E6-850F-B1167515C920"
CODEBASE="./nsip.CAB#version=1,0,0,1"
ID="Ctrl1"
name="Ctrl1">
</OBJECT>
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
<INPUT TYPE=BUTTON VALUE="Click Me" onclick="fn()" >
</TD> </TR> </TABLE>
<INPUT TYPE=TEXT ID="ConnectionString" VALUE="" >
</body>
</html>
The INF file: [version] ; version signature (same for both NT and Win95) do not remove signature="$CHICAGO$" AdvancedINF=2.0
[Add.Code]
nsip_ax_10.ocx=nsip_ax_10.ocx
nsip_ax_10.inf=nsip_ax_10.inf
[nsip_ax_10.ocx]
file=thiscab
clsid={E228C560-FA68-48E6-850F-B1167515C920}
RegisterServer=yes
FileVersion=1,0,0,1