CreateInstance security violation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • guy

    #1

    CreateInstance security violation

    i have some code that worked fine that has now been moved out to a separate
    assembly, (simplifeid below)

    Dim asm As System.Reflecti on.Assembly =
    System.Reflecti on.Assembly.Get Assembly(Owning MainForm.GetTyp e)
    Dim o As Object = asm.CreateInsta nce(frm, True)

    and i now get a system.security .ipermission exception:-
    "Request for the permission of type
    'System.Securit y.Permissions.S ecurityPermissi on, mscorlib, Version=2.0.0.0 ,
    Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed."

    anyone know how i can get round this? (the assembly and frm are both correct)

    *guy*
  • Ronin

    #2
    RE: CreateInstance security violation

    Don't quote me on this... ... that folder where the solution is newly located
    might not be set up in the .NetFramework configuration with in that machine.


    best luck to you though.



    Ronin

    "guy" wrote:
    [color=blue]
    > i have some code that worked fine that has now been moved out to a separate
    > assembly, (simplifeid below)
    >
    > Dim asm As System.Reflecti on.Assembly =
    > System.Reflecti on.Assembly.Get Assembly(Owning MainForm.GetTyp e)
    > Dim o As Object = asm.CreateInsta nce(frm, True)
    >
    > and i now get a system.security .ipermission exception:-
    > "Request for the permission of type
    > 'System.Securit y.Permissions.S ecurityPermissi on, mscorlib, Version=2.0.0.0 ,
    > Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed."
    >
    > anyone know how i can get round this? (the assembly and frm are both correct)
    >
    > *guy*[/color]

    Comment

    Working...