If you're talking about the classes in the System.AddIn
namespace, then you probably want the article How to: Activate Add-ins with Different Isolation and Security Levels, and related links, where you can specify that some (or all) add-ins should have NetworkInformationPermission
by using a PermissionSet
.
NetworkInterface.GetAllNetworkInterfaces() causes System.Security Exception
-
23-03-2022 - |
Pregunta
I have used microsoft add in framework. From the main host I am loading an add-in and in add-in I have written :
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces()
.
The above line causes System.Security Exception. The complete exception message says: [Request for the permission of type 'System.Net.NetworkInformation.NetworkInformationPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.].
Please help and let me know how can I set security permissions for a dll loaded as add in(Reflection).
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow