new ActiveXObject("Scripting.FileSystemObject") 时抛出异常,解决方案方法
来源:互联网 发布:雪鹰领主法器进阶数据 编辑:程序博客网 时间:2024/05/16 18:52
使用JScript读写本地文件时,会使用Scripting.FileSystemObject控件。
IE默认是不允许运行这类“未标记为安全执行脚本的ActiveX控件”的。
因此执行下行代码时:
fso = new ActiveXObject("Scripting.FileSystemObject");
会抛出“Automation 服务器不能创建对象”的异常。
解决方法是:
IE -> Internet选项 -> 安全 -> 自定义级别 -> ActiveX控件和插件 -> 对未标记为可安全执行脚本的ActiveX控件初始化并执行脚本(不安全) -> 启用
注意:
启用此选项只可用于调试本地代码,在访问其它网站前一定记得改过来。
否则恶意脚本将通过IE具有读、写、遍历你本地文件等的全部权限!
- new ActiveXObject("Scripting.FileSystemObject") 时抛出异常,解决方案方法
- new ActiveXObject("Scripting.FileSystemObject") 时抛出异常
- new ActiveXObject("Scripting.FileSystemObject") 时抛出异常
- js 文件操作 fso new ActiveXObject( "Scripting.FileSystemObject ")
- new ActiveXObject("Scripting.FileSystemObject") 未能创建对象的解决方法
- js中new ActiveXObject("Scripting.FileSystemObject")等操作本地文件用法
- new ActiveXObject("Scripting.FileSystemObject") 未能创建对象的解决方法
- (转)JS、ActiveXObject、Scripting.FileSystemObject
- Scripting.FileSystemObject
- throw new NotImplementedException(); 方法未实现时在方法内添加,抛出异常方便下次知道
- Scripting.FileSystemObject对象
- Scripting.FileSystemObject对象
- Scripting.FileSystemObject对象
- Scripting.FileSystemObject 文件操作
- Scripting.FileSystemObject对象
- 如何安装Scripting.FileSystemObject组件和三种禁用FileSystemObject组件的方法
- FileSystemObject 和 Scripting 运行时库参考的介绍
- 用new分配对象失败时,会不会抛出异常
- 三个和尚的故事 与 项目机构管理
- 自定义TabBarController
- Windows批处理程序的书写来处理文本
- libcurl出现CURLcode 23 CURLE_WRITE_ERROR错误
- boost序列化
- new ActiveXObject("Scripting.FileSystemObject") 时抛出异常,解决方案方法
- log4j配置
- 10044-Erdos number Time limit exceeded
- Cocos2d游戏开发常用工具集合
- Binary XML file line : Error inflating class <unknown> 解决
- 一个人的冲锋
- 认识大数据分析
- float unsinged int
- Linux下LibCurl编程