General discussion

Locked

COM objects in Visual Basic

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.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

COM objects in Visual Basic

by MedievalDude In reply to COM objects in Visual Bas ...

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.

Collapse -

COM objects in Visual Basic

by agibbs In reply to COM objects in Visual Bas ...

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 . . .

Collapse -

COM objects in Visual Basic

by matthew.alverson In reply to COM objects in Visual Bas ...

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.

Collapse -

COM objects in Visual Basic

by agibbs In reply to COM objects in Visual Bas ...

I tried that, works great!

Thanks,
Aaron

Collapse -

COM objects in Visual Basic

by agibbs In reply to COM objects in Visual Bas ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums