• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

Denied Access to DLL after use in IIS

I've written an ActiveX component in VC6 and I've registered it on an NT4 Server running IIS4. Once I make a call to the component from an ASP I can't gain access to the file again (to recompile, delete, whatever).

I've stopped the WWW, FTP and Admin services (no Gopher installed) and I wait until inetinfo.exe unloads itself, yet still I cannot gain access to the DLL. Eventually the Admin service will start up again and along with it inetinfo.exe.

How can I get IIS or whatever else may be using the DLL to let go of it?

BTW, the same thing happens with the Personal Web Server on the NT4 WS Development machine. Even after I stop the server, the DLL is locked down.

Andrew
0
forloop
Asked:
forloop
  • 2
1 Solution
 
AlexVirochovskyCommented:
Can try unload DLL from memory:

    HMODULE hDll = ::GetModuleHandle("NAME.DLL");
    if (hDll)
      {
         char buff[101];
         ::GetModuleFileName(hDll,buff,100);
         int  nModule = GetModuleUsage(hDll);
         for (int i = 0; i < nModule; i++)
           FreeLibrary(hDll);
       }
Can be, after this you can edit DLL
0
 
mikeblasCommented:
Forcing the DLL out of memory is guaranteed to cause you some stability problems.

If the DLL is still in memory even after all the IIS services (not just the web service) have been shut down, the service you've written has a reference leak and needs to be debugged.

B ekiM
0
 
AlexVirochovskyCommented:
If you want "utility" solution, i can  send you UNLOAD.EXE

0
 
forloopAuthor Commented:
Well, turns out I recompiled the DLL under a new name and the new DLL acted as expected. I was able to delete it after I stopped the web services. As far as the orginal DLL. I still can't delete the file.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now