COM-object is locked after first use in ASP, DLL can't be deleted - why?
Hi there,
I have a big problem with my COM-objects, after I compiled them as a DLL and after running them succesfully in an ASP-script I can't recompile the DLL in VC++ because the file is somehow locked - read: in use, but all my browser windows and server-sessions using this COM-object are closed. The only solution for this problem is to restart the computer, this is really a SLOW process ...
I also tried to unregister the object with the regsvr32-command but this did not really help :-( ... any solution for this problem? Did I oversee a setting in the configuration of my IIS (Win2000) ? Or is the problem COM-related and if so, is there a fix? I think the solution must be very simple but for the moment I'm somehow to blind ... btw. this also happens with other components, so others than mine, the problem seems to be the ASP-script or so ...
I use: set objTest = Server.CreateObject ("ASPTest.myASPtest")
to create the object and
objTest.Testfunc ()
to call a function ... as it is described in every book ...
HELP!?
Thank you in advance!
Tristan McLure
Re: COM-object is locked after first use in ASP, DLL can't be deleted - why?
Running an ASP script loads that object into memory, hence you cannot delete it. If it is an un-configured component, you'll need to restart IIS or if it is configured, just shut down the application in which the component sits.
Re: COM-object is locked after first use in ASP, DLL can't be deleted - why?
At your Windows->Start->Run type the following:
net stop w3svc
This will stop the IIS and MTS components and you don't need to restart the machine if you are using Windows 2000 (On NT4.0 somehow you may still have to restart the server).
When you update your MTS components, you can run the following to resume the IIS:
net start w3svc
Hope this helps.
Re: COM-object is locked after first use in ASP, DLL can't be deleted - why?
Your DLL is locked by inetinfo.exe (IIS or PWS)
Kill the process INETINFO.EXE, rebuild and restart inetinfo.exe