2013-03-14 47 views
0

我已經使用了微軟添加框架。從主要主機我加載加載項和加載項我寫:NetworkInterface.GetAllNetworkInterfaces()導致System.Security異常

NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces()。 上面的行導致System.Security異常。完整的例外消息說:[Request for the permission of type 'System.Net.NetworkInformation.NetworkInformationPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.].

請幫助,讓我知道如何設置作爲加載(反射)加載的DLL的安全權限。

回答