This is a known problem documented in MS KB. Apparently it is a feature not a bug. :)
IIS
http://support.microsoft.c
PWS
http://support.microsoft.c
Main Topics
Browse All TopicsHere is the scenario:
1. A web server running NT4 and IIS;
2. Active Server Pages running on the server; 3. SQL Server backend database;
4. VB ActiveX DLLs being called from the ASPs to create recordsets
from the SQL Server data;
Now, the problem. And the problem is not limited to the creation of recordsets; it occurs anytime a method is called from an ASP.
When trying to recompile the DLL after making a change, I am getting a message telling me that "access is denied" to the DLL file.
I guessed that there was a reference to the DLL being held open somewhere. I tried stopping and starting the WWW Service, closing and opening VB, stopping and starting the inetinfo.exe process, and everything else imaginable. Then only thing that will release the refernce to the DLL so that it can be recompiled is restarting the Server, which everyone will agree is not a viable option
Obviously I am missing something.
Any idea why I can't recompile VB DLLs once they have been called from the WWW service???
PS: I also played around with the version settings at Project/Properties/Make, to no avail.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
This is a known problem documented in MS KB. Apparently it is a feature not a bug. :)
IIS
http://support.microsoft.c
PWS
http://support.microsoft.c
Simple Solution, just a few rules:
If you are running on a live website, it is always good practice on any system web or otherwise to copy your project before issuing a new version.
Rule 1
After any recompile always copy your software folder.
e.g.
C:\VB6\YourAppV100 becomes C:\VB6\YourAppV101
Rule 2
Load your VB app from the new folder and change the project title. (You don't need to save as a different name.)
e.g.
YourAppV100 becomes YourAppV101
Rule 3
Never place you WebClass.ASP file in the same folder as your development folder.
Rule 4
You can run the VB project whenever you like because it is not running in the live web folder. When you are happy and want to put it live, compile the DLL into the same folder as your current application folder:
e.g.
C:\VB6\YourAppV101
Manually edit your live web page ASP page with the new project name e.g. YourAppV101
e.g.
' at the top of the page
Const YourLib="YourAppV101." ' Changes as per the current version
' later, as required
Set LibFunc=Server.CreateObjec
Then restart as per rule 1-4 etc.
Rule 5
Never place instances of you object in the Application() or Session() objects.
Rule 6
You end up with folders:
C:\VB6\YourAppV100
C:\VB6\YourAppV101
C:\VB6\YourAppV102
C:\VB6\YourAppV103
You can't delete these folders until the site is stable and you have made posative progress. IIS won't let you delete until you have follwed PaulHughes advice re. downing the IIS, if not the server.
If you follow these rules you will always be in control and your site will only need to be downed before you do a folder clean-up.
Business Accounts
Answer for Membership
by: PaulHewsPosted on 2001-03-13 at 09:05:20ID: 5925216
>Any idea why I can't recompile VB DLLs once they have been called from the WWW service???
The web server caches a reference to them, holding them open even after all objcts have been set to nothing:
Restarting the web server from the console does nothing so you will have to restart it from the
command line.
Create a batch file in the system directory with these commands:
(mtxstop may not be necessary in PWS)
net stop iisadmin /y
mtxstop
net start w3svc
net start msftpsvc