SunQuest
 
       ASP
  Home arrow ASP arrow Page 2 - Getting Remote Files With ASP
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP

Getting Remote Files With ASP
By: Justin Cook
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 58
    2005-08-09

    Table of Contents:
  • Getting Remote Files With ASP
  • The Concept
  • The Code Client Script Initialization
  • PerformUpdate() Explained
  • WriteFile() Explained

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Getting Remote Files With ASP - The Concept


    (Page 2 of 5 )

    Before we begin coding, I’d like to explain what we are going to be doing. There are two ASP applications we will be creating. The first one we’ll refer to as the client, though it technically will still be an application running on a Web server. The second we’ll refer to as the server, which is basically the master application, which will serve updates to the clients.

    The client and server may be on the same domain, but in a real life deployment would probably be on completely separate servers and domains. If you do not have the ability to create multiple domains, you can put both on the same domain and put the client script in one folder and the server script in another. Or you can create two different Web servers on the same machine with the technique described here: http://www.aspfree.com/c/a/IIS/Creating-Test-and-Production-Sites-
    With-Only-One-IIS-Server/
    .

    Client Script

    The client script initiates the communication for our auto-update demonstration. From this script, in our example, we will send the server a fake license key as an identifier. The server will then send back the files for the newest version, and any messages (errors, actions, and so on). The files will then be saved to the client's system, and any messages will be parsed and acted upon.

    Server Script

    The server script will send the client a mixed format stream. The stream will consist of text files, text messages, and Base64 encoded binary files. Okay, technically it’s not mixed format, but we are intermixing binary files with text files and text messages –- all within the same XML tree.

    Because we are transferring binary files there is often a security risk involved on the server side. And, with an auto-update schema, we would often like to authenticate the client with a license key to make sure that the software has actually been paid for and properly activated. Our server script will not actually perform any authentication, but in a real life situation, the server would do a database lookup to find the license key, check to see whether it is active, and return files associated with the version we are updating to.

    The server may also return messages to the client. Examples of these messages may be: disabling or re-enabling the auto-update, letting the client know the software has not yet been paid for, turning settings on or off, and more.

    More ASP Articles
    More By Justin Cook


       · Getting Remove Files is very nice article. But It will be so good if the screen...
     

    ASP ARTICLES

    - ADO for the Beginner
    - ADO.NET 101: Data Rendering with a DataGrid ...
    - Introducing SoftArtisans OfficeWriter 3.0 En...
    - Getting Remote Files With ASP
    - The Real Basics of Functions in ASP
    - Enhancing Readability with ASP
    - Mimicking PHP's String Formatting Functions
    - Windows Server Hacks 12, 77, and 98
    - How to Sort a Multi-Dimensional Array
    - Developing an Information Management Tool wi...
    - What are Active Server Pages?
    - Getting Remote Pages with ASP
    - FTP’ing Files with ASP
    - Apply Single-Sign-On to Your Application
    - Easy Error Management





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway