View Full Version : Proxy - Desperately need help!


epicmove
06-20-2007, 07:23 AM
Hi guys.

Really struggling with this one.

I have written a screen scraping application to retrieve some information from a web site that uses forms authentication.

This works fine on my public broadband link but fails at work because of our proxy server. I originally created a web based application so just set the following in my web.config to use default credentials for our proxy:

<system.net>
<defaultProxy useDefaultCredentials="true"/>
</system.net>

This works fine. However I now need to reproduce the application as a windows form application so need to accomplish this through code.

I am using a httpWebRequest to retrieve the contents of the page. I have scoured through a number of examples on the web but nothing seems to work.

I just want to know how to accomplish the settings in the web.config file through code.

Many thanks,

Ben :confused: