ActiveX in ASPX page problem

  • Thread starter Thread starter Dmitri Demyanik
  • Start date Start date
D

Dmitri Demyanik

Hi,

I have written ActiveX control.
When I run aspx page, I get message:
"Object doesn't support this property or method", e.g
CardReader.Run(); line.

But it works fine in simple test html page. Why it does not work in ASPX?
In debugger I see that CardReader is not null.

Here is the code from aspx page:

<html>
<head>
<title id="title1" runat="server">WebForm1</title>
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
<link id="link1" runat="server" href="" type="text/css"
rel="stylesheet"/>
<script For="CardReader" EVENT="OnSwiped(data)">
alert(data);
</script>
<script>
function test()
{
CardReader.Run();
}
</script>
</head>
<body onload="test()">
<OBJECT id="CardReader"
CLASSID="CLSID:CE94EA7C-DD0A-4082-8540-D45863EA65A6" VIEWASTEXT></OBJECT>
<form id="Form1" method="post" runat="server">

</form>

</body>
</html>

Thank you,
Dmitri
 
Dmitri,

I'm having the same problem. Runs fine if click the html page but put the
same code within an aspx page and run it and i first get the "An ActiveX
control on the page is not safe..." and then i get the "Object doesn't
support this property or method" VBScript error.

I'll closely monitor this thread!

Thanks
Harry
 
Harry,

I have found myself the reason of the problem :) - it is because of IE
security restriction. You should allow to run unsafe and unsigned ActiveX
controls in Security settings of IE for local intranet zone.

Dmitri
 
Yup,

Bruce also wrote that it was a permissions problem. I've asked the company
that is providing the .ocx for a "Safe" one if possible because it's a bit
of a hassle to have to go change client browser settings.

Thanks Dmitri,

Harry
 
Back
Top