url rewriting

Discussion in 'ASP .Net Security' started by Randy, Jun 6, 2005.

  1. Randy

    Randy Guest

    I have a URL Rewriting class that implements the IRules interface.
    Everything works fine until my code accesses the HttpContext via the
    HttpApplication.Context property.

    I'm trying to pass a string from the global.asax BeginRequest event to my
    url rewriter by placing it on the Context.Cache.

    However, as soon as I add code to access the context, i get a
    SecurityException of type AspNetHostingPermission


    here is my httpModule code:
    public string Execute(HttpApplication appl, string _path, string
    settingsSection)
    {
    string tabUrlKeyword = appl.Context.Items["urlKeyword"].ToString();



    Here is the exception

    SecurityException: Request for the permission of type
    System.Web.AspNetHostingPermission, System, Version=1.0.5000.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.]


    I've tried explicitly the trust level but that doesn't help either.

    <trust level="Full" originUrl=""/>
     
    Randy, Jun 6, 2005
    #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. Juha Borenius

    URL rewriting

    Juha Borenius, Aug 14, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    475
    Colin Young
    Aug 15, 2003
  2. Thedotnetteer
    Replies:
    2
    Views:
    809
    Thedotnetteer
    Nov 27, 2003
  3. sandeep pandit via .NET 247
    Replies:
    0
    Views:
    913
    sandeep pandit via .NET 247
    Apr 28, 2004
  4. Gaurav  Agarwal
    Replies:
    2
    Views:
    747
    Gaurav Agarwal
    Jan 31, 2005
  5. =?Utf-8?B?cmFwaWRkYXRh?=

    url rewriting with no extension in url

    =?Utf-8?B?cmFwaWRkYXRh?=, Nov 1, 2006, in forum: ASP .Net
    Replies:
    8
    Views:
    417
    Flinky Wisty Pomm
    Nov 2, 2006
Loading...

Share This Page