Link to home
Start Free TrialLog in
Avatar of mskvarenina
mskvarenina

asked on

How to capture HTTP server return codes using the webbrowser control with Visual Basic

I'm creating a program in Visual Basic that will launch a particular URL.  I need to be able to receive and act upon HTTP server messages.  For example I may want to capture and act upon HTTP error 500 - Bad script request or HTTP error 404.

The StatusTextChange event does fire with each status text change and I can see things like:

Start download from site: res://C:\WINDOWS\SYSTEM\SHDOCLC.DLL/http_500.htm
Downloading from site: res://C:\WINDOWS\SYSTEM\SHDOCLC.DLL/http_500.htm

I suppose I could parse these text messages looking for "http_500", "http_404", etc but I'm wondering if there's a more direct way?

ASKER CERTIFIED SOLUTION
Avatar of Melih SARICA
Melih SARICA
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial