Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Help, multiple calls with Inet object causes site to lock up

Reply
Thread Tools

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

 
 
Dan
Guest
Posts: n/a
 
      11-12-2004
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


 
Reply With Quote
 
 
 
 
Tom Kaminski [MVP]
Guest
Posts: n/a
 
      11-12-2004
"Dan" wrote:
> 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
 
Reply With Quote
 
 
 
 
Dan
Guest
Posts: n/a
 
      11-18-2004
Thanks, that seemed to solve the problems I was having.



"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
news0C01529-56B9-4352-A32C-...
> "Dan" wrote:
>> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read-Write Lock vs primitive Lock() k3xji Python 7 12-30-2008 10:19 PM
Application.Lock()/UnLock() or lock(Application) nano2k ASP .Net Web Services 2 08-09-2007 09:31 AM
ods calls business object then method calls ta with output params andy6 ASP .Net 2 06-09-2006 01:54 AM
Threading - Why Not Lock Objects Rather than lock the interpreter Fuzzyman Python 3 12-05-2003 10:43 PM
RE: Threading - Why Not Lock Objects Rather than lock theinterpreter Robert Brewer Python 0 12-05-2003 05:33 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57