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.

This might be a better way to ask my question

I'm using CAS SecurityAction.RequestOptional to protect my assembly. What CAS Permission do I need to execute the following code

Dim domain As AppDomain = AppDomain.CreateDomain("NiceName")

The error I get is:
"The domain manager specified by the host could not be instantiated."

This article has been dead for over six months. Start a new discussion instead.