I have solved this problem. In case anyone else has some similar problem......
It appears to be related to the length of the URL. I don't know if there is a max number of chars that can be used?
Although in the example above I used xyzzy.txt, in reality I was using
Dim filename As String = DateTime.Now.ToBinary.ToString
just to generate a near-unique filename
When I did that it didn't work.....
but when I shorten the filename by
filename = Mid$(filename, (filename.Length - 5))
then it works just fine.
Most wierd.