Security problem with Managed Code calling Unmanaged Code in a Web Page

Discussion in 'ASP .Net Security' started by GAH, Jul 11, 2003.

  1. GAH

    GAH Guest

    Hello,

    I have a web page which contains an ActiveX control (unmanaged) and a
    Windows Forms User Control (managed). Both reside on a web page and are
    glued using VBScript. The user control raises events which are handled by
    the VBScript. This is generating the error "Error: Request for the
    permission of type System.Security.Permissions.SecurityPermission, mscorlib,
    Version=1.0.5000.0, Culture=neutural, PubliKeyToken=b77a5c561934e089 failed.
    Code: 0"

    The error is understandable, because managed code needs permission to call
    unmanaged code. So I created a new code group with full trust under Machine
    level and set the membership to include everything below http://someserver/
    URL:

    caspol -machine -addgroup All_Code -url http://someserver/* FullTrust -n
    MyNewCodeGroup

    This didn't seem to help. Turning code access security off entirely solved
    the problem. But this is obviously not a safe state to leave the machine
    in.

    caspol -s off

    Am I missing some other permissions? Any suggestion is appreciated.
    Thanks!
     
    GAH, Jul 11, 2003
    #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. =?Utf-8?B?U2FuZHk=?=

    Managed and Unmanaged Code Confusion

    =?Utf-8?B?U2FuZHk=?=, Oct 26, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    549
    Kevin Spencer
    Oct 26, 2004
  2. Laurent Bugnion
    Replies:
    0
    Views:
    472
    Laurent Bugnion
    Dec 6, 2006
  3. Amit Dedhia
    Replies:
    5
    Views:
    713
    Ben Voigt
    Oct 24, 2006
  4. frank
    Replies:
    3
    Views:
    800
    rossum
    Jan 22, 2007
  5. Jürgen Tabert

    managed C++ Webservice and unmanaged code

    Jürgen Tabert, Jun 3, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    156
    Jürgen Tabert
    Jun 3, 2005
Loading...

Share This Page