Home arrow ASP arrow Page 3 - HTTP Tunneling Revealed: Part 1/3
ASP

HTTP Tunneling Revealed: Part 1/3


What do the iNet control, XMLHTTP and web services have in common? They all use HTTP tunneling. In this 3 part series, Adnan gets under the hood and shows us exactly what HTTP tunneling is.

Author Info:
By: Adnan Masood
Rating: 4 stars4 stars4 stars4 stars4 stars / 50
October 17, 2002
TABLE OF CONTENTS:
  1. · HTTP Tunneling Revealed: Part 1/3
  2. · What is HTTP Tunneling?
  3. · More on iNET and XMLHTTP
  4. · ASPTear In Action
  5. · A ServerXMLHTTP Example
  6. · Conclusion

print this article
SEARCH DEVARTICLES

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

blog comments powered by Disqus
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...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials