Hi,
automatic discovery in ISA Server 2004 works well and without problem. I use
it for 18 months without problem.
ISA Server 2004 generates and provides automatic discovery informations
(files) for Firewall Clients and Web Proxy Clients file using WPAD protocol.
You don't need manualy create or modify wpad.dat (for Web Clients) or
wspad.dat (for Firewall Clients) files and place it somewhere on IIS on
firewall.
For clients configuration you can use DHCP or/and DNS. DNS use port always
port 80, DHCP use port 8080 by default.
To modify content of the WPAD files go to ISA management snap-in,
Configuration -> Networks -> Internal (in your case) -> Properties -> Auto
Discovery, Firewall Client and Web Browser tabs.
To test automatic discovery create CNAME alias wpad to point at the firewall
host record. Try ping wpad and if it is OK type http://wpad/wpad.dat in web
browser. Firewall must sent you wpad.dat file. This file is sent to clients
on behind and is stored in Internet Temporary Files.
generated wpad.dat file looks like this
//Copyright (c) 1997-2004 Microsoft Corporation
BackupRoute="DIRECT";
UseDirectForLocal=true;
function MakeIPs(){
this[0]="10.0.0.0";
this[1]="255.255.255.0";
}
DirectIPs=new MakeIPs();
cDirectIPs=2;
function MakeNames(){
this[0]="*.example.cz";
this[1]="*.internal";
}
DirectNames=new MakeNames();
cDirectNames=2;
HttpPort="8080";
cNodes=1;
function MakeProxies(){
this[0]=new Node("firewall.example.cz",0,1.000000);
}
Proxies = new MakeProxies();
function Node(name, hash, load){
this.name = name;
this.hash = hash;
this.load = load;
this.score = 0;
return this;
}
function FindProxyForURL(url, host){
var urlhash, urllower, ibest, bestscore, list, i, j, port=HttpPort;
urllower = url.toLowerCase();
if((urllower.substring(0,5)=="rtsp:") ||
(urllower.substring(0,6)=="rtspt:") ||
(urllower.substring(0,6)=="rtspu:") ||
(urllower.substring(0,4)=="mms:") ||
(urllower.substring(0,5)=="mmst:") ||
(urllower.substring(0,5)=="mmsu:"))
return "DIRECT";
if (UseDirectForLocal && isPlainHostName(host))
return "DIRECT";
if (cDirectNames > 0)
for (i = 0; i < cDirectNames; i++)
if (shExpMatch(host, DirectNames[i]))
return "DIRECT";
if (cDirectIPs > 0)
for (i = 0; i < cDirectIPs; i += 2)
if (isInNet(host, DirectIPs[i], DirectIPs[i+1]))
return "DIRECT";
urlhash = HashString(url);
for (i = 0; i < cNodes; i++)
Proxies[i].score = Proxies[i].load * Scramble(MakeInt(urlhash ^
Proxies[i].hash));
list = "";
for (j = 0; j < cNodes; j++) {
for (bestscore = -1, i = 0; i < cNodes; i++) {
if (Proxies[i].score > bestscore) {
bestscore = Proxies[i].score;
ibest = i;
}
}
Proxies[ibest].score = -1;
list = list + "PROXY " + Proxies[ibest].name + ":" + port + "; ";
}
list = list + BackupRoute;
return list;
}
function HashString(url){
var h = 0;
var slashes = 0;
for (var i = 0; i < url.length; i++) {
var c = url.charAt(i);
if (c == '/')
slashes++;
if (slashes < 3)
c = c.toLowerCase();
h += (((h & 0x1fff) << 19) | ((h >> 13) & 0x7ffff)) + CharToAscii(c);
h = MakeInt(h);
}
return h;
}
function Scramble(h){
h += ((h & 0xffff) * 0x1965) + ((((h >> 16) & 0xffff) * 0x1965) << 16) +
(((h & 0xffff) * 0x6253) << 16);
h = MakeInt(h);
h += (((h & 0x7ff) << 21) | ((h >> 11) & 0x1fffff));
return MakeInt(h);
}
var Chars ="
!\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~????????????«®¬????????????»Ÿ?
·¢£€¡|§šCª<?R¯°?²³Ž??.ž±º>¥œµ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ";function CharToAscii(c){ return Chars.indexOf(c) + 32;}function MakeInt(x){ if (x < 0) { return x + 4294967296; } else if (x >= 4294967296) { return x - 4294967296; } return x;}For more information about WPAD start read this overview:http://www.microsoft.com/technet/prodtechnol/isa/2004/plan/automaticdiscovery.mspx-Rosta Bilek<***@gmail.com> wrote in messagenews:***@f14g2000cwb.googlegroups.com...> Hi,>> I am experiementing with WPAD (Web Proxy Auto Detect) using isa 2004.>> I tried to create a simple wpad.dat file like> function FindProxyForURL(url, host)> {> if(shExpMatch(url, "!https:*") || isPlainHostName(host) || \> dnsDomainIs(host, "mydomain.com") || dnsDomainIs(host,> mydomain.com"))> {> return "DIRECT";> }> else> {> return "PROXY wpad.mydomain.com:8080; DIRECT";> }> }>> I don't have an iis server. So where do I put this file. I tried to put> it under c:\ and the root of where ISA 2004 was installed.> When I do "http://wpad.mydomain.com:8080/wpad.dat" I got a complete> different file.> I use google desktop to search my server and no other wpad than mine> was found.> WPAD doesn't work.>> Any idea?>> Thanks,>