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
  1. Home
  2. General Programming
  3. C#
  4. ??? about firewalled environment ???

??? about firewalled environment ???

Scheduled Pinned Locked Moved C#
questionhelpworkspace
3 Posts 2 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.
  • M Offline
    M Offline
    mohadcs
    wrote on last edited by
    #1

    I wrote a program needs to connect to remote servers, my problem is - my program throw an exception when i try to connect from firewalled or proxy environment. the question is: How can i import IE settings to my program? OR "at least":sigh: How can i the proxy settings in my program? please help me with a piece of code or at least ClassName please reply...

    T 1 Reply Last reply
    0
    • M mohadcs

      I wrote a program needs to connect to remote servers, my problem is - my program throw an exception when i try to connect from firewalled or proxy environment. the question is: How can i import IE settings to my program? OR "at least":sigh: How can i the proxy settings in my program? please help me with a piece of code or at least ClassName please reply...

      T Offline
      T Offline
      Travis D Mathison
      wrote on last edited by
      #2

      Well, as far as getting the proxy settings from IE -- You can grab the ProxyServer value from HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer (REG_SZ); how you use this depends on what you're connecting to obviously... RegistryKey key = Registry.CurrentUser; key = key.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings"); Console.WriteLine(key.GetValue("ProxyServer")); -- modified at 7:07 Monday 16th October, 2006

      M 1 Reply Last reply
      0
      • T Travis D Mathison

        Well, as far as getting the proxy settings from IE -- You can grab the ProxyServer value from HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer (REG_SZ); how you use this depends on what you're connecting to obviously... RegistryKey key = Registry.CurrentUser; key = key.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings"); Console.WriteLine(key.GetValue("ProxyServer")); -- modified at 7:07 Monday 16th October, 2006

        M Offline
        M Offline
        mohadcs
        wrote on last edited by
        #3

        Thanx, but i still can not establish a connection becuase i cannot use that value or where i can use it in my connection //establish TCP connection try { CallTrace(" Connect at port {0}", port); serverTcpConnection = new TcpClient(popServer, port); } catch (Exception ex) { throw new Pop3Exception("Connection to server "+ popServer + ", port " + port + " failed.\nRuntime Error: "+ex.ToString()); }

        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