A
Andreas Schuler
Hi all,
I have written a UserControl derived object in C# and registered it as
a COM object using the Setup Project in VS 2005.
First questions are: is this the right way to go about COM with .NET? I
know about the GAC, do I still have to register the COM object in the
registry if I install my dll there (the Setup project allows me to put
my dlls in there)? Won't people installing my tool require
administrative privileges if I use the GAC (which I would consider a
drawback)? How would I refer to the object if it is in the GAC, still
via the GUID (see HTML code below)?
Now to the main issue I am facing:
I have written a very simple test page to test my control:
<html>
<head>
<title>Test Page</title>
</head>
<body>
<!-- using the object tag to call my ActiveX -->
<object id="nmp" name="nmp"
classid="clsid:afe80b5b-170e-467a-abdb-bc2394cf5429"
width="500" height="300">
</object>
<script>
function nmp::ErrorEvent(e)
{
alert('NMP reports an error: ' + e.Message);
var o = document.getElementById('nmp');
o.SetStream('00000000000000000000000000000000');
}
</script>
</body>
</html>
Now when I open this file from my computer with IE7 everything works
perfectly. But when I use my local Apache server to host this file, the
object doesn't show up! The really strange thing is that even when I
view the source within the browser it is letter for letter identical.
Has anyone experienced a similar problem? I am using version 2.0.59 of
Apache btw. Is there something wrong with the encoding? Even though I
doubt it, but is there any way Apache could somehow disable ActiveX
objects? Am a missing a security setting (although I did enable all
ActiveX related settings)?
Thanks for any suggestions in advance,
Andreas
I have written a UserControl derived object in C# and registered it as
a COM object using the Setup Project in VS 2005.
First questions are: is this the right way to go about COM with .NET? I
know about the GAC, do I still have to register the COM object in the
registry if I install my dll there (the Setup project allows me to put
my dlls in there)? Won't people installing my tool require
administrative privileges if I use the GAC (which I would consider a
drawback)? How would I refer to the object if it is in the GAC, still
via the GUID (see HTML code below)?
Now to the main issue I am facing:
I have written a very simple test page to test my control:
<html>
<head>
<title>Test Page</title>
</head>
<body>
<!-- using the object tag to call my ActiveX -->
<object id="nmp" name="nmp"
classid="clsid:afe80b5b-170e-467a-abdb-bc2394cf5429"
width="500" height="300">
</object>
<script>
function nmp::ErrorEvent(e)
{
alert('NMP reports an error: ' + e.Message);
var o = document.getElementById('nmp');
o.SetStream('00000000000000000000000000000000');
}
</script>
</body>
</html>
Now when I open this file from my computer with IE7 everything works
perfectly. But when I use my local Apache server to host this file, the
object doesn't show up! The really strange thing is that even when I
view the source within the browser it is letter for letter identical.
Has anyone experienced a similar problem? I am using version 2.0.59 of
Apache btw. Is there something wrong with the encoding? Even though I
doubt it, but is there any way Apache could somehow disable ActiveX
objects? Am a missing a security setting (although I did enable all
ActiveX related settings)?
Thanks for any suggestions in advance,
Andreas