Managed control and security

Discussion in 'ASP .Net Web Controls' started by layos, Feb 19, 2007.

  1. layos

    layos Guest

    Hi all,
    I have a problem while working on a dotnet assembly control in a
    web page. I wrote on interop group without any answer, and now i try
    here.

    I'm tring to send codebehind the "css" style as an object. I
    publish a propery of type "object" and I'm tying to cast this object
    as a know type (because the type after the property population is
    "system.__comobject").

    I tried add a recerence of the microsoft.mshtml library, in order to
    find an appropriate class to cast my comobject but when I instanciated
    each class inside this namespace I had a security permission error
    like this:

    ************** Exception Text **************
    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.ThrowSecurityException(Assembly
    asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle
    rmh, SecurityAction action, Object demand, IPermission permThatFailed)
    at
    System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object
    assemblyOrString, PermissionSet granted, PermissionSet refused,
    RuntimeMethodHandle rmh, SecurityAction action, Object demand,
    IPermission permThatFailed)
    at
    System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet
    grants, PermissionSet refused, PermissionSet demands,
    RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction
    action, Boolean throwException)
    at
    System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack
    cs, PermissionSet grants, PermissionSet refused, PermissionSet
    demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
    at DotnetGrid.ManagedGrid.ManagedGrid_Load(Object sender, EventArgs
    e)
    at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
    at System.Windows.Forms.UserControl.OnCreateControl()
    at System.Windows.Forms.Control.CreateControl(Boolean
    fIgnoreVisible)
    at System.Windows.Forms.Control.CreateControl()
    at System.Windows.Forms.Control.WmShowWindow(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.ContainerControl.WndProc(Message& m)
    at System.Windows.Forms.UserControl.WndProc(Message& m)
    at
    System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at
    System.Windows.Forms.Control.ActiveXImpl.System.Windows.Forms.IWindowTarget.OnMessage(Message&
    m)
    at
    System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
    msg, IntPtr wparam, IntPtr lparam)
    The action that failed was:
    LinkDemand
    The type of the first permission that failed was:
    System.Security.Permissions.SecurityPermission
    The Zone of the assembly that failed was:
    Intranet


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    DotnetGrid
    Assembly Version: 1.0.0.18413
    Win32 Version: n/a
    CodeBase: http://localhost/managedgrid/gridassembly/DotnetGrid.dll
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.198 (QFE.050727-1900)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Web.Services
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
    ----------------------------------------
    Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    b3_k6knk
    Assembly Version: 1.0.0.18413
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
    ----------------------------------------

    TIA for any help.

    --
    layos
     
    layos, Feb 19, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dmitry
    Replies:
    0
    Views:
    799
    Dmitry
    Nov 1, 2004
  2. c guan
    Replies:
    1
    Views:
    470
    Natty Gur
    Jun 22, 2004
  3. nicholas
    Replies:
    3
    Views:
    848
    nicholas
    Oct 4, 2004
  4. Ryan Stewart

    J2EE container managed security

    Ryan Stewart, May 30, 2004, in forum: Java
    Replies:
    2
    Views:
    3,370
    Oscar kind
    May 31, 2004
  5. GAH
    Replies:
    0
    Views:
    496
Loading...

Share This Page