ActiveXObject creation error “ Automation server can't create object”

前端 未结 6 1463
予麋鹿
予麋鹿 2020-12-09 10:18

I have a very simple javascript code,



        
相关标签:
6条回答
  • 2020-12-09 10:38

    For this to work you have to really, really loosen your security settings (generally NOT recommended)

    You will need to add the website to your "Trusted Zone", then go into the custom settings (scroll about 1/2 way down the page) and change:

    ActiveX controls and plugins - Enable (or prompt)... any of the settings that apply to your code (I think the very last one is the one you are hitting) -- "script ActiveX controls marked safe for scripting*"

    That all said, unless you have a really, really good reason for doing this - you are opening up a major "hole" in your browsers security... step very carefully... and do not expect that other end users will be willing to do the same.

    0 讨论(0)
  • 2020-12-09 10:43

    Well you can not run code from notepad so that means you are opening up the page from the file system. aka c:/foo/bar/hello.html

    When you run the code from the asp.net page, you are running it from localhost. aka http://loalhost:1234/assdf.html

    Each of these run in different security zones on IE.

    0 讨论(0)
  • 2020-12-09 10:46

    i also have same problem and solve it. Please go through the link

    add your site to trusted zone and change following options in ie Tools Menu -> Internet Options -> Security -> Custom level -> "Initialize and script ActiveX controls not marked as safe for scripting"

    http://forums.codeguru.com/showthread.php?t=256114

    0 讨论(0)
  • 2020-12-09 10:50

    This error is cause by security clutches between the web application and your java. To resolve it, look into your java setting under control panel. Move the security level to a medium.

    0 讨论(0)
  • 2020-12-09 10:59

    This is caused by Security settings for internet explorer. You can fix this,by changing internet explorer settings.Go To Settings->Internet Options->Security Tabs. You will see different zones:i)Internet ii)Local Intranet iii)Trusted Sites iv)Restricted Sites. Depending on your requirement select one zone. I am running my application in localhost so i selected Local intranet and then click Custom Level button. It opens security settings window. Please enable Initialize and script Activex controls not marked as safe for scripting option.It should work.

    enter image description here

    enter image description here

    0 讨论(0)
  • 2020-12-09 11:04

    I have the same problem , it solved by registering the dll

    at project properties => build => register for COM interop => check it

    0 讨论(0)
提交回复
热议问题