Microsoft JScript Runtime Error: Security Transparent method "MacActiveX.MacActive.GetComputerMAC ()" Attempt to access security critical method " System.Management.ManagementClass. ctor (System.String) "failed.
Assembly "Macactivex, version=1.0.0.0, culture=neutral, publickeytoken=null" marked AllowPartiallyTrustedCallersAttribute and use a Level 2 security transparency model. By default, Level 2 transparency causes all methods in the AllowPartiallyTrustedCallers assembly to become safe and transparent, which may be the cause of this exception.
Workaround: Add property settings to the class header: [System.Security.SecuritySafeCritical]
<object classid= "clsid:afea693d-7566-4f1e-b77c-80ccc2932296"
Codebase= "macactivexsetup.cab#version=1,0,0,0" id= "Hellobossma" ></object>
AssemblyInfo.cs Add the following
Using System.Security;
[Assembly:allowpartiallytrustedcallers ()]//Grant Trust rule statement
[Assembly:securityrules (SECURITYRULESET.LEVEL1)]//Add Transparency Rule Declaration
Reference Documentation:
Http://www.cnblogs.com/yilin/p/csharp-activex.html
Http://www.cnblogs.com/weixing/archive/2013/06/28/3161165.html
Http://www.cnblogs.com/shuang121/archive/2012/06/04/2534296.html
http://q.cnblogs.com/q/57913/
http://blog.csdn.net/ddllzz2008/article/details/5784737
ActiveX control Authoring Process Issues Summary