Microsoft KB Archive/200260

= PRB: Permission Denied Error When Attempting to Recompile an ASP DLL =

Article ID: 200260

Article Last Modified on 5/2/2006

-

APPLIES TO


 * Microsoft Active Server Pages 4.0

-



This article was previously published under Q200260



SYMPTOMS
When attempting to recompile a custom-built ActiveX dynamic link library (DLL) on a Windows 95 or Windows 98 computer that is running Microsoft Personal Web Server (PWS) 4.0, you may get an error message similar to the following:

Permission denied: 

Where  is the path to the Active Server Page (ASP) DLL.

You may see an error message similar to the following if you attempt to rename the DLL in Windows Explorer:

Cannot rename : Access is denied.

Make sure the disk is not full or write-protected

and that the file is not currently in use.

Where  is the filename of the DLL.

You may see an error message similar to the following if you attempt to delete the DLL in Windows Explorer:

Cannot delete : Access is denied

Make sure the disk is not full or write-protected

and that the file is not currently in use.



CAUSE
When an ASP instantiates a custom-built ActiveX DLL using Server.CreateObject("ActiveX.Class") the DLL gets instantiated within the Web services process, in this case, PWS. PWS does not release the DLL once the DLL is instantiated.



RESOLUTION
Stopping and restarting PWS from the SysTray icon does not release the lock on the ActiveX DLL that is instantiated by an Active Server Page (ASP).

In order to release the lock on a DLL, PWS must be manually stopped using the command prompt. By default, Pws.exe resides in the folder C:\Windows\System\Inetsrv. To stop PWS, type the following command:

windows\system\inetsrv\pws.exe /stop

You can then restart PWS manually restarted from the Command Prompt by using the following command:

windows\system\inetsrv\pws.exe /start

Once PWS is stopped, this will release the ActiveX DLL. Recompile the DLL, if necessary. Once PWS restarts, it will again lock the DLL when it gets instantiated by an ASP.

Another Resolution
At the run line, type: net stop iisadmin /y and then press Enter. This will stop all services while running the make on the DLL.

After the make DLL is complete, type: net start w3svc from the run line. Your services will be up again.



STATUS
This behavior is by design.

