url rewriting

R

Randy

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=""/>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top