I have working .NET 2.0 addin that takes an AppDomain created by an external application and applies user-defined security policy (PolicyLevel) by using AppDomain.SetAppDomainPolicy() method. However, this method is obsolete in .NET 4.0 and fails at runtime. Here is a sample code:
|
I saw 4.0 example setting AppDomain security by using following call:
|
However, this API is used when an AppDomain is already created. In my situation the addin has to use existing AppDomains.
Another solution I
found was to use .config files and add
Is there a way to change AppDomain security at runtime after it has been created in 4.0?
I hope that this should be possible, since otherwise it would look like 4.0 removed the ability to tighten security at run-time.
Thanks
Replies
Know the answer? Post it — somebody with the same question will find it here.