c# - ActiveX works on localhost, doesn't work on external server -
edit2: users having same problem, have managed solve using this page. luck!
edit: apperently problem need install activex component on client computer. right way this?
i wrote small activex component in c# searches removable drives usb flash drives. have followed steps here, in short wrote code , did: regasm aclass.dll /tlb /codebase
i wrote activex component because needs executed on external server. made small webpage uses activex. when use localhost code gets executed , usb key gets detected. works inside asp.net page final goal.
however, when accessing page external server, code doesn't executed. placed javascript alerts before , after loading activex component. alert after loading activex doesn't fire.
the webpage uses code:
<html> <head> <script language="javascript"> alert("loading activex"); var x = new activexobject("anamespace.aclass"); alert(x.getdrives()); alert("done"); </script> </head> <body></body> </html>
i can post c# activex code although think isn't needed, tries find removable diskdrives, , did work fine on localhost.
note, first time working activex. in advance!
be sure, installed activex control on target machine. i'm using regdllview check it. utility free , can find here: http://www.nirsoft.net/ (try use x86 , x64 depends on control ). luck! :) jeffamaphone says - "...this painful, poorly documented world you've entered.." it's true :)
Comments
Post a Comment