Help, multiple calls with Inet object causes site to lock up

D

Dan

I developed a website that posts data to another url via the Inet object.

I should mention that the posting code is wrapped in a VB 6 dll, and that
dll is called from ASP.

Here's the ASP code:

<%
Dim objPostWrapper
Set objPostWrapper = Server.CreateObject("MyDLL.PostWrapper")
objPostWrapper.Process "http://www.someurl.com"
%>

Here's the code from the class in the VB 6 dll:

Public Sub Process(Byval url As String)
Dim oInet, strResponse As String
Set oInet = CreateObject("InetCtls.Inet.1")
oInet.RequestTimeOut = 20
strResponse = oInet.OpenURL(url)
Set oInet = Nothing
End Sub

That's pretty much it. Sometimes it works, other times it stops mid-process
and locks up the website.

Any idea what's going on? Is it some sort of threading issue, where I can't
use the Inet object from within a VB 6 dll?

Thanks in advance,
Dan
 
T

Tom Kaminski [MVP]

Dan said:
I developed a website that posts data to another url via the Inet object.

I should mention that the posting code is wrapped in a VB 6 dll, and that
dll is called from ASP.

Here's the ASP code:

<%
Dim objPostWrapper
Set objPostWrapper = Server.CreateObject("MyDLL.PostWrapper")
objPostWrapper.Process "http://www.someurl.com"
%>

Here's the code from the class in the VB 6 dll:

Public Sub Process(Byval url As String)
Dim oInet, strResponse As String
Set oInet = CreateObject("InetCtls.Inet.1")
oInet.RequestTimeOut = 20
strResponse = oInet.OpenURL(url)
Set oInet = Nothing
End Sub

That's pretty much it. Sometimes it works, other times it stops mid-process
and locks up the website.

Any idea what's going on? Is it some sort of threading issue, where I can't
use the Inet object from within a VB 6 dll?

Don't use the Inet object, it isn't designed for server use like that.
Here's a much better way:
http://www.aspfaq.com/show.asp?id=2173
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top