Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. HttpWebRequest in medium trust

HttpWebRequest in medium trust

Scheduled Pinned Locked Moved ASP.NET
htmlsysadminsecurityquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    daniel__c
    wrote on last edited by
    #1

    Hey All, I have an app that is requesting and scraping a static html page and have just realised that the machine that it is going to be hosted on is running the site under medium trust (which is not negotiable). So now i have a whole lot of scraping stuff happening, but can no longer make the http request without a security exception on the production server. The current code making the request is: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url); HttpWebResponse response; try{ response = (HttpWebResponse)request.GetResponse(); } catch(Exception ex){ throw new InvalidOperationException("Could not retrieve requested page.",ex); } ....then reading the stream in and putting into a string for use. Does anyone know of a way to make a request for a static html page on another site without running into security problems? Thanks

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups