Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: Error code is not returned from Http web control
hariv
hariv@mascotsystems.com

From: Bangalore, India
Posts: 5
Member Since: 02/18/03
posted February 18, 2003 9:11 AM

Hi,

I am using Http web control inside a Active-X DLL. I am using POST method inside. This component is being called from VC++. The problem I am facing is, the error code after POST is not properly returned. Most of the times it returns 0. Has any body faced this problem before?

Hari.
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted February 18, 2003 11:14 AM

Hi,
What do you expect the error code to be after your post?
Are you sure the Post is not working? What is the Http.Status after the call? Even a 4xx or 5xx response would indicate a successful Post.
Thanks,
-ken
hariv
hariv@mascotsystems.com

From: Bangalore, India
Posts: 5
Member Since: 02/18/03
posted February 18, 2003 11:42 AM

If I am accessing some URL using PostDemo example, it displays proper error codes like the following.
12007 (Server Name not resolved)
12045 (Certificate Authority error)

But the same when I am doing through the VB DLL, I am always getting Err.Number as 0.

I need detailed error numbers for different sitiuations like,

1. When server is down
2. When the URL is wrong
3. When there is a Time out
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted February 24, 2003 10:17 AM

Hi,
I am unable to reproduce this. Below is the simple code I used for my dll.
-ken

Option Explicit
  Private WithEvents Http1 As Http

Private Sub Class_Initialize()
  Set Http1 = New Http
End Sub

Public Function DoGet(Url As String)
Dim data As String
On Error GoTo UrlError
  Http1.Url = Url
On Error GoTo GetError
  Http1.Get data
  DoGet = data
Exit Function

UrlError:
  DoGet = "Url Error:" & Err.Number & ":" & Err.Description
Exit Function

GetError:
  DoGet = "Get Error:" & Err.Number & ":" & Err.Description & ":" & Http1.Url
End Function
hariv
hariv@mascotsystems.com

From: Bangalore, India
Posts: 5
Member Since: 02/18/03
posted February 24, 2003 1:25 PM

Ken,

Thanks for your reply. I think I was missing the WithEvents clause in the declaration. It seems to be working now.

Thanks a ton,
Hari.
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX