|
-
Mar 16th, 2004, 08:07 AM
#1
Thread Starter
Fanatic Member
Webclient via proxy
Hi.
I have previously used the Webclient object to download files and pages. But on my company pc we use a proxy to access the internet, and I can't get it to work.
Does anyone know how to use the same proxy settings as the ie?
The best thing would of course be for the app. to adopt the ie proxy settings automatically.
I have been looking at GlobalProxySelection, but I have not been able to figure it out.
I have never done anything like this before, so please explain it like I was 4 years old...
Edit: I have searched and seen some threads about this, but they all went over my head...
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Mar 16th, 2004, 09:42 AM
#2
Hyperactive Member
Maybe this MSDN-page can be of some help to you! Especially this: INTERNET_OPEN_TYPE_PRECONFIG part!
Grtz,
Bloged
-
Mar 16th, 2004, 09:50 AM
#3
Thread Starter
Fanatic Member
Hi.
Well, thanks for your answer, Bloged. It appears to do what I want. But I'm afraid that all my follwing operations would rely on the handle from this function. This would mean, that I have to stick with the API's.
I was kinda hoping there would be a .NET-way of doing this.
And I think there must be...with all the proxy and security etc. classes available.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Mar 16th, 2004, 11:03 AM
#4
New Member
From here , it looks like you can do this:
VB Code:
Dim myWebRequest As HttpWebRequest = CType(WebRequest.Create("http://www.microsoft.com"), HttpWebRequest)
Dim myProxy As WebProxy = CType(myWebRequest.Proxy, WebProxy)
' Print the Proxy Url to the console.
Console.WriteLine(ControlChars.Cr + "The actual default Proxy settings are {0}", myProxy.Address)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|