HttpUtility.UrlEncode security workaround

  • Thread starter Thread starter Marc Cardinal
  • Start date Start date
M

Marc Cardinal

I have a need to encode and decode url content. I'm currently using
the UrlDecode and UrlEncode methods from the HttpUtility class.

However the code must be able to run under the .Net Internet
Permission trust level. Since there is a
System.Web.AspNetHostingPermission link demand on the HttpUtility
class, I cannot use the decode and encode methods. Anyone have a
workaround for this?
 
Have you tried to access it through the server object as Server.UrlDecode()
or HttpContext.Current.Server.UrlDecode()? Sometimes that works better.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Back
Top