“var f = new ActiveXObject('Scripting.FileSyst

2019-03-01 03:47发布

问题:

I am very new in using ActiveX controll through java script,

I write var f = new ActiveXObject('Scripting.FileSystemObject'); in my code and Its was working fine on IE6, but recently I upgraded my IE6 to IE8 and what I found now its not working on IE8, returning the error given below:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; MS-RTC LM 8; .NET4.0C; .NET4.0E; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Timestamp: Wed, 31 Aug 2011 14:23:40 UTC

Message: Automation server can't create object
Line: 735
Char: 9
Code: 0
URI: http://localhost:8080/

qocweb/script/main/MainLetter.js

I googled this and found there is something missing in the IE ActiveX setting and got resolved this problem, But now I have a requirement that it should be solved without playing with IE8 setting.

Can anyone have any idea about this, any suggestion would be really appreciable...

回答1:

You can not use this component with default security settings due to security reasons. Read this for more information.