How to download a file from HandleSpecialURL?

I want to run a webservice on one server and store a file on another server.

I would like to be able to call the webservice like this: and then a file should immediately download, or a save as dialog is shown from the users browser, similar to what happens when ShowURL is called.

But in the App.HandleSpecialURL eventhandler I cannot use ShowURL, because session and webpage are not available.

If I understand right, then I can use webfile only for files which are stored on the same computer as the running webservice, but my file is on another file server (like

Is there a way to initiate a file download from HandleSpecialURL, without showing a webpage?

Request.Print("<script>window.location = ''</script>")

Of course you can create a webfile, and put it’s URL between the single quotes.

Thanks a lot Michel, this seems to work as expected! Great!