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

Discussion in 'ASP General' started by Dan, Nov 12, 2004.

  1. Dan

    Dan Guest

    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
     
    Dan, Nov 12, 2004
    #1
    1. Advertisements

  2. "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
     
    Tom Kaminski [MVP], Nov 12, 2004
    #2
    1. Advertisements

  3. Dan

    Dan Guest

    Thanks, that seemed to solve the problems I was having.



    "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
    news:D...
    > "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
     
    Dan, Nov 18, 2004
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. andy6
    Replies:
    2
    Views:
    865
    andy6 via DotNetMonster.com
    Jun 9, 2006
  2. Fuzzyman
    Replies:
    3
    Views:
    578
    Andrew MacIntyre
    Dec 5, 2003
  3. Robert Brewer
    Replies:
    0
    Views:
    560
    Robert Brewer
    Dec 5, 2003
  4. k3xji
    Replies:
    7
    Views:
    940
    Gabriel Genellina
    Dec 30, 2008
  5. nano2k

    Application.Lock()/UnLock() or lock(Application)

    nano2k, Jul 23, 2007, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    354
    nano2k
    Aug 9, 2007
Loading...

Share This Page