Solved

Denied Access to DLL after use in IIS

Posted on 1998-12-31
4
169 Views
Last Modified: 2010-04-16
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
Comment
Question by:forloop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1181366
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
 
LVL 11

Accepted Solution

by:
mikeblas earned 50 total points
ID: 1181367
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
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1181368
If you want "utility" solution, i can  send you UNLOAD.EXE

0
 

Author Comment

by:forloop
ID: 1181369
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
max float value 3 59
HTTPSendRequest with WinINet delays on first call 11 84
Autosar OS Multicore Share Resources confusion ? 2 108
Adding items to a C# list incrementally 5 64
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question