Here is two requests, one from IE, and one from my gadget for the same file.
IE 7
GET /clientraw.txt x=0.16605528136779068 HTTP/1.1
Accept: */*
Accept-Language: en-nz
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2; FDM; .NET CLR 1.1.4322)
Host: johna.freewebpage.org
Connection: Keep-Alive
HTTP/1.1 200 OK
Date: Sun, 04 Mar 2007 02:46:07 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6 DAV/1.0.2 mod_perl/1.24_01 mod_throttle/3.1.2
Last-Modified: Fri, 12 May 2006 01:29:33 GMT
ETag: "10b92-243-4463e4fd"
Accept-Ranges: bytes
Content-Length: 579
Connection: close
Content-Type: text/plain
12345 0.0 0.0 329 9.0 95 1004.0 0.0 67.0 67.0 0.045 0.000 15.6 66 0.0 0 0.0 0 0 67.0 0.0 0.0 0.0 -100.0 -100.0 -100.0 0 0 0 13 49 37 St_Martins_WX-1:49:37_p.m. 0 0 12 5 100 100 100 100 100 100 100 9.0 9.5 9.0 9.0 1 Stopped_raining\Night_time 0.0 0 7 7 7 7 5 5 2 3 3 3 3 3 3 2 2 2 2 2 2 5.4 8.2 312.4 12/5/2006 9.5 9.5 9.0 7.9 0.0 2 2 4 4 4 3 3 2 2 2 9.2 9.2 9.1 9.0 9.0 9.0 8.9 8.9 9.0 9.0 64.0 64.0 66.0 66.0 66.0 66.0 67.0 67.0 0.0 0.0 9.0 9.0 9.0 4.3 0 --- --- 275 0 0 -100.0 -100.0 -100 0 0 0 0 0.0 15.6 15.6 8.8 1004.0 1004.0 5 1:03 1:42 8.8 8.8 8.2 8.2 4 2006 !!C10.34r!!
VISTA GADGET
GET /clientraw.txt x=0.7698874601509732 HTTP/1.1
Referer: x-gadget:///weather.html
Accept-Language: en-nz
Accept: */*
User-Agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)
Host: johna.freewebpage.org
Connection: Keep-Alive
HTTP/1.1 302 Found
Date: Sun, 04 Mar 2007 02:47:35 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6 DAV/1.0.2 mod_perl/1.24_01 mod_throttle/3.1.2|
Location: http://www.freewebpage.org/ x=0.7698874601509732
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
e4
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved <A HREF="http://www.freewebpage.org/ x=0.7698874601509732">here</A>.<P>
</BODY></HTML>
As can be seen the requests are very close but the VISTA request is adding the header Referer: x-gadget:///weather.html, and it appears that it does not matter what XML HTTP Request object I use it is always there.
I beleive that this is causing the problem but I have no idea how to fix it.
Any ideas would be appreciated.
Chris

HTTP Requests from Gadget always made with a HTTP header : referer
Paul A. Mestemaker II - MSFT
@Aimee to snoop around in the HTTP protocol you can use:
http://www.fiddlertool.com/fiddler/
curiousss
What happens if you put up a page on a different site that links to the target URL In that case, IE should set the Referer header. A hosting provider that blocks all referers would be pretty useless, but maybe they're just blocking unknown protocols (x-gadget) Have you tried overriding the header that XmlHTTPRequest sends along You should be able to do that with 'req.setRequestHeader("Referer", "http://www.example.com");'. I don't know if you can clear out that header if it's already there, but you might try 'req.setRequestHeader("Referer", null);' and see what happens.
Is the page you're trying to hit owned by you If so, you could ask your server administrator what's up with referer blocking or switch to a different hoster that doesn't block referers.
DLG007
I have tried adding a req.setRequestHeader("Referer", " but I then end up with two referer headers and a HTTP 400 Bad Request.
I will try the other thing and checkout how IE handles the referer.
Chris
Babalicious
lord_8