Hosting ASP.NET outside of IIS with medium trust ?

Discussion in 'ASP .Net' started by ilkka@webfellows.fi, Jul 16, 2007.

  1. Guest

    Hi !

    SimpleWorkerRequest class can be used to host asp.net pages outside of
    IIS. However when a web application is configured to run as medium
    trust (or lower), you will get an exception
    "System.Security.SecurityException: Request for the permission of type
    'System.Security.Permissions.SecurityPermission......' failed." when
    calling HttpRuntime.ProcessRequest (or trying to parse the page using
    PageParser.GetCompiledPageInstance).

    The reason for this is that both constructors for the
    SimpleWorkerRequest perform a security demand that requires
    UnmanagedCode permission. This permission is not normally granted in
    any partial trust environment.

    How can I host (if possible) asp.net in medium trust environment? I
    suppose I'd have to inherit from the HttpWorkerRequest class and do
    some stuff. Any help would be appreciated.

    Thanks!
     
    , Jul 16, 2007
    #1
    1. Advertisements

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. EP
    Replies:
    2
    Views:
    2,160
  2. Paul Hatcher

    Medium Level Trust and Reflection

    Paul Hatcher, Feb 25, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    605
    Paul Hatcher
    Feb 25, 2005
  3. Michael Howes
    Replies:
    0
    Views:
    599
    Michael Howes
    Jan 26, 2006
  4. =?Utf-8?B?TWFyayBMZWlzdG5lcg==?=

    Does GridView.DataBind work under medium trust with custom objects

    =?Utf-8?B?TWFyayBMZWlzdG5lcg==?=, Aug 22, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    665
    =?Utf-8?B?TWFyayBMZWlzdG5lcg==?=
    Aug 23, 2006
  5. Andy
    Replies:
    1
    Views:
    462
  6. Jordan M.
    Replies:
    1
    Views:
    617
    Mark Fitzpatrick
    Jun 23, 2007
  7. Mr.Cyber
    Replies:
    3
    Views:
    481
    Nicole Calinoiu
    Dec 16, 2005
  8. Linda
    Replies:
    1
    Views:
    712
    Dominick Baier
    Aug 31, 2006
Loading...