Problem: Can't run ActiveXObject from Javascript
Error: System.Security.Permissions.SecurityPermission
This error occurs when you are trying to run ActiveXObject / dll using Javascript.
Solution:
A. Setting the security for the internet browser, i.e. Internet Explorer
1. Using Internet Explorer, set the security to low: Goto menu Tools -> Internet Options.
2. Goto tab Security.
* Under Internet zone, set security level to Low. Click Custom level button, in ActiveX controls and plug-ins section, Enable Script ActiveX controls marked safe for scripting*, then click OK.
* Under Local intranet zone, click Custom level button, enable things under ActiveX controls and plug-ins section, and the most important one, Enable Script ActiveX controls marked safe for scripting*, then click OK.
B. Setting .Net Framework 2 Configuration
1. Make sure you have .Net Framework 2 SDK installed on your computer. You may want to install it if you have not had it installed on your computer.
2. Goto control panel -> Administrative Tools -> open Microsoft .NET Framework 2.0 Configuration.
3. On the Tasks, click Configure Code Access Security Policy -> Adjust Zone Security -> Make changes to this computer, and Next. Set My computer & Local Intranet to Full trust, then Next -> Finish.
Restart the Internet Explorer, then try running the Web page again.
PS: While it is not recommended to run untrusted ActiveX Object, because it may cause security leak; this is a workaround to solve the problem in case it is necessary to run the ActiveX Object on client side.
Wednesday, March 16, 2011
You may be intersted in
Related Posts
Updating Table Containing Xml Column via LinkedServer
If you are trying to update a table containing XML column via Linked Server in SQL Server, and you are not able to, you are not alone. There...
0 comments:
Post a Comment