ASP
  Home arrow ASP arrow Page 3 - HTTP Tunneling Revealed: Part 1/3
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
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

HTTP Tunneling Revealed: Part 1/3
By: Adnan Masood
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 2 stars2 stars2 stars2 stars2 stars / 16
    2002-10-17

    Table of Contents:
  • HTTP Tunneling Revealed: Part 1/3
  • What is HTTP Tunneling?
  • More on iNET and XMLHTTP
  • ASPTear In Action
  • A ServerXMLHTTP Example
  • Conclusion

  • 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


    HTTP Tunneling Revealed: Part 1/3 - More on iNET and XMLHTTP


    (Page 3 of 6 )

    Even with these problems, it was a major tool and was quite publicized by Microsoft for its functionality, that later evolved into XMLHTTP and ServerXMLHTTP. In the example below I will demonstrate how it can be used to retrieve information from other servers, in this case Amazon.com. Amazon's URI, if provided with an ISBN, returns the book details, i.e. http://www.amazon.com/exec/obidos/ASIN/0764549529. The 0764549529 is the ISBN of Java Web Services programming. This example is for educational purposes only. For commercial usage, one must read the terms and conditions for the affiliate programs provided.

    Hot Tip: The header prefix -- aspcompat=true -- makes .Net pages backwards compatible with classic asp pages.

    To demonstrate what I've just been talking about, take a look at the following code, which I've saved to a file called inetinfo1.aspx:

    <%@ Page aspcompat=true %>
    <% dim URL, inet, resultant

    '// The URL to download the book information with ISBN 0764549529
    URL = "http://www.amazon.com/exec/obidos/ASIN/0764549529"
    '// Instantiating Inet Control
    inet = Server.CreateObject ("InetCtls.Inet")
    '// timeout adjustment
    inet.RequestTimeOut = 20
    '// Assign the URL
    inet.Url = URL
    '// let the variable resultant download and hold the file
    resultant = inet.OpenURL()
    Response.write ("<h1> This is an example using InetInfo</h1>")
    response.write (s)
    %>


    Here's the output from this code:

    Microsoft Internet Control in Action

    Since classic ASP doesn't have the rich I/O libraries that are required for generating server requests, or say HTTP "spoofing" -- i.e. pretending that it's just another web browser asking for info from the site. The solution was to write a component, but people found it a lot easier to purchase one of the third party components designed for this purpose.

    Finding the right time, market space and venue for commercial COM components that retrieve data from other web sites via HTTP requests was crammed. ServerObjects, the mega tools and components company, has launched AspHTTP, while AlphaSierraPapa released their AspTear. Later on, the Release of XMLHTTP and ServerXMLHTTP gave development a leading edge but ASPHTTP and ASPTear had already captured a good market.

    AspHTTP 3.5 has support for all major platforms including Windows 9X, Millennium, NT and 2000.

    This component allows the generic GET/POST/HEAD documents via HTTP, exposes HTTP response headers, supports transferring requests to a file (including binary transfers), password authentication support and more. The latest version is claimed to be 2-3 times faster than previous versions.

    AspHTTP uses the Winsock API rather than the WinInet API, documenting Microsoft's acknowledged problems as we discussed earlier. Their clientele included blue-chip companies like Bank of America, Dialog, UUNET, Trane, Visa, Sony and many others.

    ASPTear is a counterpart doing a similar job. Their explanation of requesting outputs is interesting, showing the SSI and Ddstributed EDI in a connected way, as it reads:

    "Have you ever wanted to write an ASP page that did the following: execute an ASP script on another web server; retrieve that remote ASP script's output; and act on that output? Or perhaps you've always wanted to be able to do remote Server Side Includes, like <!--#include file="http://www.someserver.com/somefile.txt"-->. ASP, alone, can't do that sort of thing. There are, however, third party components that will!"

    Its latest version, ASPTear 1.50, is documented as having the following features:
    • Retrieval of documents as strings
    • Immediate saving to disk
    • Extensive SSL support
    • Proxy Server support
    • Page caching

    More ASP Articles
    More By Adnan Masood


     

    ASP ARTICLES

    - Central Scoreboard with Flash and ASP
    - Calorie Counter Using WAP and ASP
    - Creating PGP-Encrypted E-Mails Using ASP
    - Be My Guest in ASP
    - Session Replacement in ASP
    - Securing ASP Data Access Credentials Using t...
    - The Not So Ordinary Address Book
    - Adding and Displaying Data Easily via ASP an...
    - Sending Email From a Form in ASP
    - Adding Member Services in ASP
    - Removing Unconfirmed Members
    - Trapping HTTP 500.100 - Internal Server Error
    - So Many Rows, So Little Time! - Case Study
    - XDO: An XML Engine Class for Classic ASP
    - Credit Card Fraud Prevention Using ASP and C...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek