
June 22nd, 2004, 05:29 AM
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
reading contents of a remote file with asp or is it XML?
Hi,
I need my ASP webpage to be able to read the contents of a document (i.e. test.doc) from another webserver. I know where the file is.
I've tried the following but it doesnt work and this code doesnt even have user rights which you would surely need:
PHP Code:
Set objStream = Server.CreateObject("ADODB.Stream")
'Check the object has been successfully created
If Err.Number = 0 Then
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile "\\server\test.doc"
Response.ContentType = "application/doc"
Response.BinaryWrite objStream.Read
End If
Many thanks.
|