Ok downgrading didn't work (for whatever reason). Beware once u upgrade your MDAC there's pretty much no going back.
I did however find a work around (see code below)
<%
var strFilePath = "http://servername/virualpath_to_another_machine/pathtodoc/docname.ext";
var remote = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0");
remote.open("GET", strFilePath, false);
remote.send();
Response.BinaryWrite(remote.responseBody);
Response.End;
%>
If you want the size, I did it this way
<%
var remote = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0");
remote.open("GET", strFilePath, false);
remote.send();
var Stream = Server.CreateObject("ADODB.Stream");
Stream.Open();
Stream.Type = 1 ;// adTypeBinary = 1
Stream.Write(remote.responseBody);
Stream.Position = 0;
lngBytes = Stream.Size;
s = (lngBytes / 1024);//.length;
s = s.toFixed(0);
%>
Dont forget to close the stream and the remote and set them to null.
Hope this helps.:)
|