PRB: Permission Denied Error When Attempting to Recompile an ASP DLL (200260)



The information in this article applies to:

  • Microsoft Active Server Pages

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: '<FilePath>'
Where <FilePath> 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 <FileName>: Access is denied.

Make sure the disk is not full or write-protected
and that the file is not currently in use.
Where <FileName> 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 <FileName>: 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.

REFERENCES

For the latest Microsoft Knowledge Base articles and other support information on Microsoft Visual InterDev and Active Server Pages, see the following Web page on the Microsoft Technical Support site:

Modification Type:MajorLast Reviewed:5/2/2006
Keywords:kberrmsg kbprb kbSecurity KB200260 kbAudDeveloper