Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Visual J# / February 2004

Tip: Looking for answers? Try searching our database.

detecting IE proxy settings

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
godzooky - 24 Feb 2004 18:31 GMT
how do i detect IE proxy settings in code? i can't seem to find
anything in the documentation.

thanks.
Lars-Inge T?nnessen - 24 Feb 2004 19:18 GMT
Look in the registry (HKEY_USERS)
\Software\Microsoft\Windows\CurrentVersion\Internet Settings

"ProxyEnable" and "Proxy Server"

You have to make a small program that reads the registry.

Signature

Regards,
Lars-Inge T?nnessen
http://emailme.larsinge.com
http://www.larsinge.com

Lars-Inge T?nnessen - 24 Feb 2004 20:08 GMT
And here is the example:

public class Class1
{
   public Class1()
   {
       Microsoft.Win32.RegistryKey key =
Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Window
s\\CurrentVersion\\Internet Settings");

       String keys[] = key.GetValueNames();

       for ( int counter = 0; counter < keys.length; counter++ )
           System.Console.WriteLine("Key: "+keys[counter].ToString() );

       System.Console.WriteLine("\n\n");
       System.Console.WriteLine("Proxy enabled
:"+key.GetValue("ProxyEnable") );
       System.Console.WriteLine("Proxy server
:"+key.GetValue("ProxyServer") );
   }

   /** @attribute System.STAThread() */
   public static void main(String[] args)
   {
       new Class1();
   }
}

Signature

Regards,
Lars-Inge T?nnessen
http://emailme.larsinge.com
http://www.larsinge.com

Bruno Jouhier [MVP] - 28 Feb 2004 09:47 GMT
You can use the System.Net.WebProxy class to get these settings:

   System.Net.WebProxy webProxy = System.Net.WebProxy.GetDefaultProxy();
   Uri address = webProxy.get_Address();
   // more ...

Bruno

> how do i detect IE proxy settings in code? i can't seem to find
> anything in the documentation.
>
> thanks.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.