Microsoft KB Archive/922778

= The proxy server address may not be detected when you run an autoproxy script that contains the isInNet function in the .NET Framework 2.0 =

Article ID: 922778

Article Last Modified on 9/22/2006

-

APPLIES TO


 * Microsoft .NET Framework 2.0

-



SYMPTOMS
When you run an autoproxy script that contains the isInNet function, the proxy server address may not be detected. This behavior occurs if the following conditions are true:
 * You pass a string instead of a number as a parameter to the isInNet function.
 * You use multiple IP addresses for the host parameter.
 * You use a Microsoft Internet Protocol version 6 (IPv6) for the host parameter.

When you run an autoproxy script that contains the isInNet function in the Microsoft .NET Framework 2.0, and the function receives the host parameter as either a host name or as multiple IP addresses, it does not resolve the IP address.

Note In Microsoft Internet Explorer, both the host name and the IP address can be used in the isInNet function in an autoproxy script to detect the proxy server.



WORKAROUND
To work around this behavior, use the dnsResolve function to return an IP address that the isInNet function can use.

For example, the following code does not return the proxy server address if the host parameter is not an IP address. if(isInNet(host, &quot;207.0.0.0&quot;, &quot;255.0.0.0&quot;)) By using the dnsResolve function, the isInNet function always receives an IP address, as required. The following code illustrates this method. if(isInNet(dnsResolve(host), &quot;207.0.0.0&quot;, &quot;255.0.0.0&quot;))



STATUS
This behavior is by design.

Keywords: kbproxydev kbip kbwebclasses kbscript kbrouting kbcodesnippet kbtshoot kbprb KB922778

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.