Getting Remote Files With ASP Continued - Conclusion
(Page 5 of 5 )
When all the files have been processed, and appended to the XML document, it’s all ‘saved’ and thereby transmitted back to the requesting client with this one line in the PerformUpdate() routine:
xmlDOMDocument.save(Response)
The client application will now receive the response. The amount of time to transmit the updates will obviously vary depending on the size and number of files being transferred, and the connection between the two. Once the entire XML response has been transmitted, the parsing and saving of the files now entirely becomes the responsibility of the client application.
One word of caution, if you perform very complicated or large updates, you may need to break up the update process into several passes.
There are tons of really cool things you can do with this technique to extend it. You can hide your files and create a download script that exceeds the IIS 4meg metabase limit (this ought to chafe some hides). You can even use the server script to update Windows Applications (.exe’s) where the application uses Sockets to connect to the web and then to your server script. You can essentially manage an unlimited number of remote installations from a single console: turn features on or off, limit access, grant rights, add features, fix bugs, send messages, and throw parties (this was a suggestion of the original programmer, I’ll take his word for it!). Now that anyone can transfer any type of file and run any script, you’re pretty much limited only by your imagination!
For your convenience, I’m including a link to the full script and update folder, so that you don’t have to copy and paste from this article.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |