IIS appears to bypass proxy in web.config fileRSS

3 replies

Last post Mar 19, 2019 08:05 AM by Jalpa Panchal

  • IIS appears to bypass proxy in web.config file

    Mar 16, 2019 01:52 PM|Astro2|LINK

    Hi everyone, I'm relatively new to IIS and having some issues configuring proxy for an application we've installed.  We're using IIS 10 (Windows Server 2016) for an application that requires a connection to their external IP and port. However when using WireShark to analyze network traffic the machine appears to be going directly to the IP and not through our local proxy as in -

    Internal Host UTMVTI0211---->XXBlockedByFWXX---> external IP (52.170.236.69)

    We have configured the FW to allow access from the proxy and the application Web.Config to recognize the proxy settings but still can't connect. It's trying to go directly to the external IP and not through the proxy first.

    For this to work the call has to go from our proxy to the external IP

    Internal host UTMVTI0211-->internal proxy----->OOFirewallOO-->external IP (52.170.236.69)

    I've configured the proxy settings as I know how

    <defaultProxy>
      <!--<proxy usesystemdefault="true"/> -->
     <proxy proxyaddress="http://172.22.0.999:8080" bypassonlocal="true" /> 
    </defaultProxy>
    
    AND 
    <proxy autoDetect="false" proxyaddress="http://172.22.0.999:8080" bypassonlocal="true" usesystemdefault="false" />

    Yet it still is NOT going through the proxy. Is there another file that could be overriding the settings in web.config?

    Thank you

  • Re: IIS appears to bypass proxy in web.config file

    Mar 18, 2019 08:39 AM|Jalpa Panchal|LINK

    Hi Astro2,

    Try to set set usesystemdefault property value to True. and check that you modify correct machine.config file. 

    and check the syntax and related setting:

    Proxy Configuration

    Regards,

    Jalpa.

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: IIS appears to bypass proxy in web.config file

    Mar 18, 2019 06:56 PM|Astro2|LINK

    Thank you for the response.  How do I modify my Machine.config file to include the proxy settings?  

    It doesnt seem to like the format I'm using.

    This is what I have in my machine.config by default

    <section name="connectionManagement" type="System.Net.Configuration.ConnectionManagementSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <section name="defaultProxy" type="System.Net.Configuration.DefaultProxySection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

    I tried entering 

    <section name="defaultProxy" <proxy  proxyaddress="http://172.18.4.115:8080" bypassonlocal="true"  type="System.Net.Configuration.DefaultProxySection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

    However the application won't start after that.  I'm guessing my syntax is wrong?  Any help would be appreciated.

  • Re: IIS appears to bypass proxy in web.config file

    Mar 19, 2019 08:05 AM|Jalpa Panchal|LINK

    Hi,

    You use wrong syntax.set as default machine.config fie and try to add rule allow port in firewall.

     

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.