Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reacting to server response errors, Newbie

0 views
Skip to first unread message

Jerry J

unread,
Oct 9, 2000, 3:00:00 AM10/9/00
to

Using WinInet, I've created a COM object, using ATL, that will upload
data to a Web server from a client application. On the server I will
have an ASP page that will process the data and send some response
messages to the client application.

What I would like to know is how I am supposed to capture response
errors from the server. For instance, If the server is requiring "Basic
Authentication" and I don't supply a password, I might get a response
from the server that looks like this:


<html><head><title>Error 401.2</title>

<meta name="robots" content="noindex">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859-1"></head>

<body>

<h2>HTTP Error 401</h2>

<p><strong>401.2 Unauthorized: Logon Failed due to server
configuration</strong></p>

<p>This error indicates that the credentials passed to the server do not
match the credentials required to log on to the server. This is usually
caused by not sending the proper WWW-Authenticate header field.</p>

<p>Please contact the Web server's administrator to verify that you have
permission to access to requested resource.</p>

</body></html>


How can I programmatically know that I received a logon failure. Am I
supposed to parse the above text or is there an easier way? Is there
a list of possible errors somewhere?


I'd appreciate your help,

Jerry J

0 new messages