permission denied when re-compiling 
Author Message
 permission denied when re-compiling

Hi,

I'm testing a VB6 dll that I create on an ASP page.  I need to
re-compile often.  I frequently get a "permission denied" error when I
try to compile it.

- I've read the stuff about starting and stopping PWS to release the
dll.  This doesn't solve the problem.

- The dll requires an MTS package.  Deleting the package doesn't solve
the problem.  I also disabled the "authorization checking" -- no help.

- The only thing that seems to work is to wait a few minutes before
re-compiling.  Is there a reference cached somewhere?

Thanks,

John



Mon, 24 Mar 2003 03:00:00 GMT  
 permission denied when re-compiling
Try closing the ASP page that calls the object.  In order to get
intellisense, InterDev has an open reference...

 - Paul


Quote:
> Hi,

> I'm testing a VB6 dll that I create on an ASP page.  I need to
> re-compile often.  I frequently get a "permission denied" error when I
> try to compile it.

> - I've read the stuff about starting and stopping PWS to release the
> dll.  This doesn't solve the problem.

> - The dll requires an MTS package.  Deleting the package doesn't solve
> the problem.  I also disabled the "authorization checking" -- no help.

> - The only thing that seems to work is to wait a few minutes before
> re-compiling.  Is there a reference cached somewhere?

> Thanks,

> John



Mon, 24 Mar 2003 03:00:00 GMT  
 permission denied when re-compiling
Hi John,

The "Permission denied" error indicates that some other processes are
holding this DLL. There are several situations:

1. If the DLL is running under the Microsoft Transaction Server( MTS), the
MTX.EXE process will hold the DLL. We can release it as follows,
-- Open the Microsoft Transaction Server in the MMC.
-- Double click the following nodes in turn: Microsoft Transaction Server,
Computers, My Computer, and Packages Installed.
-- Right-click the package your DLL resided in and select Shut Down.

This will stop the mtx.exe process for the DLL.

2. If the DLL is running in a Web that is running out-of-process, we can
unload the application through the Internet Service Manager. To do this,
right-click the Web application, select Properties, and then click Unload;
Or run the mtxstop utility at the command prompt.

This will stop the mtx.exe process for the out-of-process Web site and
release the lock on the DLL. After you unload the application, you should
be able to recompile the DLL.

3. If the DLL is running in a Web that is running in the Inetinfo.exe
process, what you are encountering is a caching feature of web server that
improves performance by keeping the DLL in memory for subsequent calls. Web
server loads the DLLs, such as your ActiveX DLL, and holds onto them; even
long after you have navigated to another page. Though your ActiveX DLL
instance is released after the method returns, the DLL with the class
factory for the object is still loaded in memory, making it impossible to
overwrite or recompile. To stop the Inetinfo.exe process and release the
DLL, the following utility can be used to complete it:

net stop IISAdmin

After compiling the DLL, we can restart the services using the following
command:    

net start w3svc

For more information on the lifetime of a COM Component under the web
server, ASP, please refer to our Knowledge Base article at
<http://support.microsoft.com/support/kb/articles/q166/2/79.asp> .

Please try it and let me know the results.

Thanks & Best Regards,



Tue, 25 Mar 2003 03:00:00 GMT  
 permission denied when re-compiling

I find that unregistering the DLL works.

regsvr32 /u [dllname]

Also, during development, I run the DLL in the IDE and create instances
of it from other apps. This means that the DLL doesnt have to be
re-built every time I need to test a minor change.



Fri, 28 Mar 2003 03:00:00 GMT  
 permission denied when re-compiling
Dear Gary,

Thanks!

The tip I was looking for was your first -- "MTS|My Package|Shut Down".  This allows me to re-compile at will.

Thanks also to Paul and others for your replies.

John Miedema

* Sent from Devdex.com http://www.devdex.com The Web Developers Index *
The world's largest index site for web developers.



Sat, 29 Mar 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Permission Denied during Recompile

2. permission denied when recompiling DLL.

3. I got the permission denied when recompiling my component

4. Permission Denied when recompiling DLL

5. Permission Denied While Recompiling Com Component

6. "Permission denied" when recompiling ActiveX dll

7. Recompile COM DLL permissions denied

8. Permission Denied(compile error) with opendatabase statement

9. compiling and rdo denied permissions

10. vb5 compile error: permission denied on opendatabase

11. Permission denied with RDO when compiling

12. Permission Denied while compiling...

 

 
Powered by phpBB® Forum Software