Version: 1.8.4
Add advanced web (HTTP and HTTPS) communications from either a client application or another Web Server.

WebASP ActiveX Control (HTTP and HTTPS)

Use the WebASP control to communicate with Web Servers using HTTP and HTTPS. The WebASP control differs from the Web control in the following ways:

  • It is WinInet independent, making this control suitable for high-performance web server applications.
  • It uses a powerful WebMessage object which represents an HTTP Request and Response, resulting in more intuitive use.
  • It is integrated with the WebPage object, which can be used for powerful HTML parsing and resource collecting.

Features include:

  • Easily fetch a complete web page with only one method call.
  • Post files to the server using the PostedFile property.
  • Use the included WebPage object to gather HTML resources and to parse HTML.
  • Cookie object makes it easy to create and send cookies within your code.
  • Secure (HTTPS) connections fully supported. In fact, you can custom handle received certificates.
  • Client authentication fully supported.

Development Environments

  • Visual Studio .NET (.NET Framework)
  • Visual Basic (VB)
  • Visual C++ (VC++)
  • FoxPro
  • PowerBuilder
  • Delphi
  • C++ Builder
  • ASP
  • Office 97/2000

Interface

Public Properties
Blocked A True value indicates the control is currently executing a blocking method (Timeout is greater than 0), which has neither completed nor timed out with a ptTimeout error.
Certificate Certificate Object to use when authenticating to the remote host.
LocalAddress Returns the address of the local host in dot notation (for example, nnn.nnn.nnn.nnn). When not connected, it returns an empty string.
LocalPort Returns the port number that the socket is bound to. When not connected, it returns 0.
MaxMemBuffer Maximum number of memory bytes used when receiving the body of a request.
Protocol Specifies the security protocol used.
ProxyHost Specifies the name or address of the proxy server that requests are to be routed through.
ProxyPassword Password to be sent on all requests through a proxy server that requires authentication.
ProxyPort Specifies the port used by proxy server that requests are to be routed through.
ProxyType The type of proxy server used for this connection.
ProxyUsername Username to be sent on all requests through a proxy server that requires authentication.
Redirect Determines if auto redirection is to take place.
RemoteCertificate The certificate from the remote machine.
Request WebMessage Object, the request to be sent to the server.
Response WebMessage Object, the response from the server.
Security Sets the security level during communication.
State Provides status information to the user interface. The State event fires to signal that this property has changed.
Timeout Controls the blocking behavior of methods that can be used in blocking and non-blocking ways.
Public Methods
Abort Abort any blocking method and release all system resources.
About Show the About Box.
ClearCertificate Clears the Certificate object contained in the Cerificate property.
Command Use the Command method to send any command to the server.
Get Use the Get method to retrieve data from the server.
Head Use the Head method to retrieve header data from the server.
Post Use the Post method to send data to the server for processing.
Put Use the Put method to store data on the server.
Trace Start or stop the accumulation of trace or debug data. Once started, this method accumulates data until it is turned off.
Public Events
Authenticate Fires when the remote host has sent a certificate to be authenticated.
Certificate Fires when the remote host is requesting a certificate and the Certificate property is not set to a valid Certificate Object.
Error Fires when an error condition occurs.
Progress Fires when a method has completed, the server has sent a reply, or progress information is available.
Redirect Fires when the remote host has sent a certificate to be authenticated.
State Fires when the State property changes.

Code Example

How easy is the WebASP control to use? Check out the following VB example below, which demonstrates grabbing an HTML file and saving it.

WebASP1.Timeout = 30000

'Reset the Request Message
WebASP1.Request.Content = ""

' GET a file
WebASP1.Request.Url = "www.test.com/testweb.html"
WebASP1.Get

'check the result
If WebASP1.Response.Status = 200 Then
   ' good response from server
   ' save it to a file
   WebASP1.Response.Body.Filename = "C:\temp\TestWeb.txt"
End If