ActiveX 控件始终在我的计算机上运行 - 在其他计算机上的行为不可预测?
我有一个关于我的 ActiveX 控件并不总是在其他计算机上的 IE 中工作的问题。
背景:我正在为我的公司开发一个内部应用程序。它被设计为一个独立的网页配置工具,用于查看我们的网络应用程序的静态自定义版本。用户可以选择他们想要查看的颜色、图像和其他设置,当他们单击按钮时,这些将出现在其计算机上的静态模型/预览版本中。
实现:我的 javascript 文件创建了一个文件系统/activex 对象,该对象本质上创建了一个临时 javascript 文件,其中写入了值列表。然后,当用户预览配置时,将定位 javascript 文件并将值动态加载到 dom 等中。当然,此功能仅适用于 Internet Explorer,而且充其量是阴暗的,但这是我实现纯零配置的唯一方法,客户端动态Web应用程序。
问题:当我测试脚本时,Internet Explorer 两次提示我有关 ActiveX 控件的信息,我对它们说“是”,ActiveX 功能就可以工作。每次打开页面时我都会这样做。但有时,当我将文件发送给其他人以便他们可以使用它时,他们不会收到通知,因此它不起作用。然而,有时他们确实会收到通知,而且它确实有效!我使用 IE 的默认安全设置,因此我的设置和他们的设置之间应该没有区别。
这可能与我的用户权限与他们的用户权限有关,或者这些文件是只读的(因为它们来自源代码控制,并且在放在共享驱动器上时也变为只读),或者与未知的微软黑暗势力有关超出人类理解范围?
谢谢, 乔什
I have a question about my ActiveX control not always working in IE on other machines.
Context: I'm working on an internal app for my company. It is designed to be a standalone web-page config tool for viewing a static customized version of our web app. The user may select the colors, images, and other settings they would like to see, and these will be present in the static mockup/preview version on their machine when they click a button.
Implementation: my javascript file creates a filesystem/activex object that essentially creates a temporary javascript file to which a list of values are written. Then when the user previews the configuration, the javascript file is located and values are loaded dynamically into the dom, etc etc. Naturally this functionality only works in Internet Explorer and is shady at best, but is my only way of implementing a purely zero configuration, client-side dynamic webapp.
Problem: When I test out my script, Internet Explorer prompts me twice about ActiveX controls and I say "yes" to them and the ActiveX functions work. I do this every single time I open my page. But sometimes when I send the file to another person so they can use it, they don't get the notifications so it doesn't work. However sometimes they do get notifications and it does work! I am using default security settings for IE so there should be no difference between my settings and theirs.
Could this be related to my user permissions vs theirs, or the fact that the files are read-only (because they are coming from source control and are also being made read-only when put on the shared drive.) or unknown dark Microsoft forces beyond human comprehension?
Thanks,
Josh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信您可能想创建一个 HTA(HTML 应用程序)而不是网页。就 ActiveX 对象而言,编写 HTA 可以为您提供更多特权。查看 Microsoft 的此页面: http://msdn .microsoft.com/en-us/library/ms536496(v=vs.85).aspx。
为了回答您有关权限的问题,我相信您的某些同事的 IE 设置可能会阻止网页使用 ActiveX 对象。您的设置可能是每当要创建 ActiveX 对象时都会提示您。
I believe you may want to create an HTA (HTML Application) instead of a web page. Writing HTA's gives you more privileges as far as ActiveX objects are concerned. Check out this page from Microsoft: http://msdn.microsoft.com/en-us/library/ms536496(v=vs.85).aspx.
To answer your question about privileges, I believe that some of your coworkers' IE settings probably prevent web pages from using ActiveX objects. Your settings may be such that you are prompted whenever ActiveX object are about to be created.