General discussion

  • Creator
    Topic
  • #2130904

    COM objects in Visual Basic

    Locked

    by agibbs ·

    I have created a COM DLL in Visual Basic and every time I make change to it and try to copy the new version to my web server I have to stop and restart IIS to get it to work — otherwise the file is in use.

    Anyone know a work-around for this? I’d rather not have to stop and restart IIS every time.

All Comments

  • Author
    Replies
    • #3546410

      COM objects in Visual Basic

      by medievaldude ·

      In reply to COM objects in Visual Basic

      Unfortunately, there is no way around this. Once you register your DLL on the web server and then call it, IIS grabs onto the DLL and won’t let go until you restart services. I was hoping Microsoft had fixed this problem with the latest version ofIIS that runs with Windows 2000, but it reacts the same way. It can be a real pain – especially if you don’t have the security permissions to remotely access your server.
      What I tend to do to compensate a bit for all of this is to create projects that contain a small Standard EXE and my new DLL (or new version of an old DLL). Then I just reference the DLL in my EXE and test its functionality within the VB environment at my desk to make sure it’s ready for my web pages. Once I have my DLL registered on IIS, I at least feel confident that it will behave as it should. Hope that helps a bit.

      • #3569160

        COM objects in Visual Basic

        by agibbs ·

        In reply to COM objects in Visual Basic

        Actually, I just found out that’s not entirely correct — if you unload the application (not remove, UNLOAD) from the website that last used the component, IIS lets go of the DLL so you can replace it.

        Keep in mind, though, that if the site’s application runs in a pooled process, all the applications in the pool are unloaded . . .

    • #3549298

      COM objects in Visual Basic

      by matthew.alverson ·

      In reply to COM objects in Visual Basic

      Instead of registering your dll with the web server. I would recommend using the Microsoft Transaction Server (NT4) or Component Manger (win2k). It requires you to change the way you call the dll slightly or the component manager can create a registeration disk to run on the webserver. However when you want to update all you have to do is drag the dll from explorer into the console.

    • #3569159

      COM objects in Visual Basic

      by agibbs ·

      In reply to COM objects in Visual Basic

      This question was closed by the author

Viewing 2 reply threads