I got a SecurityException error

Hi, all
When I embeded GoDiagram Win 2.2 in my asp.net webform. I’ve got a SecurityException error.
Have you ever seen this exception in your web form?

  1. Source Code
    // GoDiagram License
    Northwoods.Go.GoView.VersionName = “#License value get from Licensemanager #”;

    // create a Go view (a Control) and add to the form
    GoView myView = new GoView();
    myView.Dock = DockStyle.Fill;
    this.Controls.Add(myView);
    myView.Document.UndoManager = new GoUndoManager();
    try
    {

    // create two nodes for fun…
    GoBasicNode node1 = new GoBasicNode();

    // specify position, label and color
    node1.Location = new PointF(100, 100);
    node1.Text = “first”;
    node1.Editable = true; // first node is editable with F2 only
    node1.Brush = Brushes.Blue;
    // add to the document, not to the view
    myView.Document.Add(node1);
    }
    catch (Exception ex)
    {
    this.textBox1.Text += ex.ToString();
    }

  1. Exception Message
    System.Security.SecurityException: Request for the permission of type ‘System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.
    at System.Security.CodeAccessSecurityEngine.ThrowSecurityExcept ion(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
    at System.Security.CodeAccessSecurityEngine.ThrowSecurityExcept ion(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
    at System.Security.CodeAccessSecurityEngine.CheckSetHelper(Perm issionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
    at System.Security.CodeAccessSecurityEngine.CheckSetHelper(Comp ressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
    at Northwoods.Go.GoShape.GetPenInfo(Pen p)
    at Northwoods.Go.GoShape…ctor()
    at Northwoods.Go.GoPort…ctor()
    at Northwoods.Go.GoBasicNode.CreatePort()
    at Northwoods.Go.GoBasicNode…ctor()
    at SC710.SC710040…ctor()
    The action that failed was:
    InheritanceDemand
    The type of the first permission that failed was:
    System.Security.Permissions.SecurityPermission
    The Zone of the assembly that failed was:
    Intranet

Are you using the Northwoods.Go.dll that comes with the GoDiagram Win kit?
In order to handle various permission problems we have had to modify the code in a bunch of places. Most of the changes are fine for both full-trust and for reduced-trust environments, but unfortunately some changes result in reduced functionality even when running with full-trust. So we have created a parallel set of DLLs, Northwoods.GoRT.* (for “Reduced Trust”), that are nearly identical to the regular ones, but that can run better with limited permissions. You can download them from [EDIT: obsolete reference elided]. This is described in more detail in the GoWinIntro.doc file. Make sure you recompile and deploy using the replacement DLLs, not the original ones. For regular applications, though, you’ll want to continue using the original ones.