Hello every1,
I'm using CAS permissions in my app, everything is working except when I want to load an assembly. All CAS Settings now are:
<Assembly: FileIOPermission(SecurityAction.RequestOptional, Unrestricted:=True)>
<Assembly: FileIOPermission(SecurityAction.RequestMinimum, Unrestricted:=True)>
<Assembly: UIPermission(SecurityAction.RequestOptional, Unrestricted:=True)>
<Assembly: UIPermission(SecurityAction.RequestMinimum, Unrestricted:=True)>
<Assembly: FileDialogPermission(SecurityAction.RequestRefuse, Unrestricted:=True)>
<Assembly: FileDialogPermission(SecurityAction.RequestMinimum, Unrestricted:=True)>
<Assembly: IsolatedStorageFilePermission(SecurityAction.RequestOptional, Unrestricted:=True)>
<Assembly: IsolatedStorageFilePermission(SecurityAction.RequestMinimum, Unrestricted:=True)>
<Assembly: SecurityPermission(SecurityAction.RequestOptional, Unrestricted:=True)>
<Assembly: SecurityPermission(SecurityAction.RequestMinimum, Unrestricted:=True)>
in a method i want to load the assembly
Dim hostEvidence As Object() = {New Zone(SecurityZone.MyComputer)}
Dim trustedEvidence As Evidence = New Evidence(hostEvidence, Nothing)
Dim d As AppDomain = AppDomain.CreateDomain("_Contacts", trustedEvidence)
In the AppDomain.CreateDomain I get the following error
"The domain manager specified by the host could not be instantiated."
It must be a CAS Permission that I can not find, without CAS it works fine.
I hope some1 knows how to help me.