Internet Proxy

Version 1
    This document was generated from CDN thread

    Created by: Jaclyn Kollar on 03-02-2010 10:06:32 PM
    Hi,
     
    My customer uses an Internet Proxy server, which requires all users to enter in username and password to access the web.  I have the Proxy server IP Address, and a username and password.  But where (and what's the format) do I enter this information on the Windows server that I installed SDK on?  I just want to use the sample IP Phone Service files provided by SDK.  Do I enter this proxy info/command in the .asp file?
     
    Has anyone else run into this issue with a customer?
     
    Thanks for the help,
    Jaclyn

    Subject: RE: Internet Proxy
    Replied by: Anitha V on 05-02-2010 07:05:33 AM
    Hi Jaclyn,
     
    Looks like you need to modify the code to include the proxy server IP address, user id and password.
     
    Regards,
    Anitha

    Subject: RE: Internet Proxy
    Replied by: Jaclyn Kollar on 05-02-2010 06:15:04 PM
    Thanks Anitha.
     
    Do you know the format / command to add this information to the file?

    Subject: RE: Internet Proxy
    Replied by: kirk moren on 05-02-2010 06:28:42 PM
    The Cisco IP Phone Services SDK comes with a COM component called CiscoURLProxy that supports an unauthenticated proxy.   In general this is used to simplify retrieving web content if you don't want to do it in your language of choice.  
     
    Since your proxy requires authentication, this Cisco supplied COM component may not suffice.  Since you said you want to use the ASP samples, you will have to modify the sample code as suggested and your options would include... 
     
    1) Open source or commercial COM component that has proxy support (e.g. http://www.serverobjects.com/comp/asphttp3.htm).  The component will likely be bundled with instructions on how to modify the code.   Microsoft makes a few free components that would likely work - Msxml2.XMLHTTP.4.0 or Msxml2.ServerXMLHTTP.4.0 has setProxy and setProxyCredentials.
     
    2) Build your own COM component using VB or .Net.  
     
    3) Convert the asp sample to an aspx (asp.net) page.  This would require modifying the page a little to be an aspx extension as well as adding a Page directive and a few imports statements on the top for System.Net and System.Web,   Once this is done, you can use the .Net classes to get through the proxy.
     
    With VB.Net the code would look like the following...
     
    WebProxy proxy = new WebProxy("http://proxyaddress:80/", true);
    proxy.Credentials = new NetworkCredential("userId", "password", "Domain");
    WebRequest request = WebRequest.Create(http://www.c-sharpcorner.com);
    request.Proxy = proxy;
     
    4) Try using javascript and it's web support (new ActiveXObject("Msxml2.XMLHTTP")) to specify the proxy and password and then get the data.