none
How to get the pac auto-config file to work with IE9 and multiple network adapters RRS feed

  • Question

  • Several of our computers have been upgraded from IE8.X to IE9.  Since the upgrade the auto configuration PAC proxy script that selects a proxy based on myIpAddress(), that works fine on IE7 and IE8, now fails on certain machines that have IE9.

    Sample of our script:

    function FindProxyForURL(url, host) {

    // If user requests plain hostnames, e.g. http://informatics/, send direct.

            if (isPlainHostName(host)) return "DIRECT";

    // If the machine requesting a website falls within IP range,

    // send traffic via proxy stcweb.statcan.ca running on port 80.

            if (isInNet(myIpAddress(),"xxx.xxx.0.0","255.255.0.0") ||

                    isInNet(myIpAddress(),"xxx.xxx.xxx.0","255.255.255.0"))

                    return "PROXY proxy1.example.ca:80";    

    else

    return "DIRECT";

    }

    After analyzing the issue, we found out, that the issue occurred on machines that have multiple network adapters (two virtual,  one wired) and the myIpAddress() function returns the IP address of the first network adapter it will find wich in our case is one of the virtual adapters not the the wired adapter my OS uses to send web traffic.

    Is there some way we can specify what adapter "myIpAddress()" should target?

    Thursday, August 23, 2012 6:28 PM

Answers

  • Hi

    I was having the same issue as you but didnt know what was the cause until I read this. I have now fixed the issue by changing the metrics on the Network cards from auto  to 1,2 and 3 with the Wired one being 1 and the two virual ones being 2 and 3 after which I needed to reboot to get it to work.

    Hope this helps you

    Joe

    Friday, August 24, 2012 3:31 PM
  • Hi,

    Please refer to the reply by spike305. If several network connections have default gateways set, Windows decide to use the one with the lowest metric.

    For your reference: http://support.microsoft.com/kb/258487

    Tracy Cai

    TechNet Community Support

    Monday, August 27, 2012 6:43 AM
    Moderator

All replies

  • Hi

    I was having the same issue as you but didnt know what was the cause until I read this. I have now fixed the issue by changing the metrics on the Network cards from auto  to 1,2 and 3 with the Wired one being 1 and the two virual ones being 2 and 3 after which I needed to reboot to get it to work.

    Hope this helps you

    Joe

    Friday, August 24, 2012 3:31 PM
  • Hi,

    Please refer to the reply by spike305. If several network connections have default gateways set, Windows decide to use the one with the lowest metric.

    For your reference: http://support.microsoft.com/kb/258487

    Tracy Cai

    TechNet Community Support

    Monday, August 27, 2012 6:43 AM
    Moderator