Using to fetch file from remote serve

Results 1 to 2 of 2

Thread: Using to fetch file from remote serve

  1. #1
    Join Date
    Dec 1969

    Default Using to fetch file from remote serve

    I&#039;m trying to get a file from a remote server using the Stream.Open method so I can then response.binarywrite it to the client. However I&#039;m getting an unhelpful error message:<BR>error &#039;c004800a&#039; <BR>/repeater.asp, line 61 <BR><BR>You can see it (not) working here:<BR><BR><BR>Where the file I&#039;m trying to fetch is<BR><BR>The offending line 61 goes:<BR><BR> "URL=" & strAddress<BR><BR>where strAddress is<BR><BR>This is vexing as I haven&#039;t got a clue what&#039;s going on. Anyone run over this before?<BR><BR>Thanks,<BR><BR>Dan

  2. #2
    Join Date
    Dec 1969

    Default That error *seems* to be...

    ...derived from 0x000a, which is "Environment is incorrect."<BR><BR>I would *guess* that to use this you need to have some kind of access permissions to the file/page given in the URL?<BR><BR>Have you tried this with an HTML page, instead of a .jpg?<BR><BR>But the other problem may well be that you can&#039;t invoke this method from ASP and VBScript.<BR><BR>If you look at the second argument to the Open, it only has two values: Open from record and Open asynchronously. (It has a third...the default...which is "not specified"...meaning that Open will choose one of the other two modes automatically. Since you aren&#039;t opening from a record, you are obviously getting "Open asynchronously.") But VBScript, since it doesn&#039;t allow you as an author to code in asynch fashion (you need to be able to start a second thread to do so) probably can&#039;t cope with this mode of open. And that might be what the error message you are getting is all about.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts