COM wrapper for DLL and rebuild errors - access denied file in use by another user 
Author Message
 COM wrapper for DLL and rebuild errors - access denied file in use by another user

I have a C# program using the COM wrapper with is called by Biztalk.

I am having problems rebuilding the application from time to time.  I get an
Access denied
message on the DLL and TLB files.

I have had to delete the COM+ component and/or rename the dll and tlb files
and sometimes even
reboot the machine in order to rebuild the application.

I have made certain that Biztalk was shutdown at the time I rebuild.

I have also found that if I delete the COM+ component, that when I do get
the app to rebuild that the
COM+ application is not automatically put back into component services.  I
have to manully register it with
regsvcs.exe

Is there some way to shutdown my COM+ application?  Is that what is using
(access denied in use by another
user) my DLL file?



Tue, 12 Oct 2004 23:13:35 GMT  
 COM wrapper for DLL and rebuild errors - access denied file in use by another user
TonyK, You can shut down your COM+ application with component services in
Windows 2k and XP. Right click on your package and select Shut Down.  If you
aren't shutting down COM+ it is very possible that that is what is causing
your difficulties.  Is your component called from IIS in any way?  You could
also try restarting your web if it is because that can hold onto the dll.
None of these should affect the tlb files though.  Are you accessing your
dll from C++ or any other development environments?  If so these could have
your dll and tlb's open.

--
Greg
http://www.claritycon.com/


Quote:
> I have a C# program using the COM wrapper with is called by Biztalk.

> I am having problems rebuilding the application from time to time.  I get
an
> Access denied
> message on the DLL and TLB files.

> I have had to delete the COM+ component and/or rename the dll and tlb
files
> and sometimes even
> reboot the machine in order to rebuild the application.

> I have made certain that Biztalk was shutdown at the time I rebuild.

> I have also found that if I delete the COM+ component, that when I do get
> the app to rebuild that the
> COM+ application is not automatically put back into component services.  I
> have to manully register it with
> regsvcs.exe

> Is there some way to shutdown my COM+ application?  Is that what is using
> (access denied in use by another
> user) my DLL file?



Wed, 13 Oct 2004 00:18:10 GMT  
 COM wrapper for DLL and rebuild errors - access denied file in use by another user
Greg, Thanks for your response.  I have tried that.  This package does not
have a start and shutdown menu option when I right click on the package.
There is something different about this package from the other packages in
component services, but I don't know what that difference is, only that
there is no shutdown and start menu option.

Thanks

Quote:
> TonyK, You can shut down your COM+ application with component services in
> Windows 2k and XP. Right click on your package and select Shut Down.  If
you
> aren't shutting down COM+ it is very possible that that is what is causing
> your difficulties.  Is your component called from IIS in any way?  You
could
> also try restarting your web if it is because that can hold onto the dll.
> None of these should affect the tlb files though.  Are you accessing your
> dll from C++ or any other development environments?  If so these could
have
> your dll and tlb's open.

> --
> Greg
> http://www.claritycon.com/



> > I have a C# program using the COM wrapper with is called by Biztalk.

> > I am having problems rebuilding the application from time to time.  I
get
> an
> > Access denied
> > message on the DLL and TLB files.

> > I have had to delete the COM+ component and/or rename the dll and tlb
> files
> > and sometimes even
> > reboot the machine in order to rebuild the application.

> > I have made certain that Biztalk was shutdown at the time I rebuild.

> > I have also found that if I delete the COM+ component, that when I do
get
> > the app to rebuild that the
> > COM+ application is not automatically put back into component services.
I
> > have to manully register it with
> > regsvcs.exe

> > Is there some way to shutdown my COM+ application?  Is that what is
using
> > (access denied in use by another
> > user) my DLL file?



Wed, 13 Oct 2004 00:52:59 GMT  
 COM wrapper for DLL and rebuild errors - access denied file in use by another user
TonyK, is it a library or a server package?  Sounds like it is a library
package since they don't have the shutdown/start options.  Is there a reason
it is a library package?  If not try switching to a server package.  (right
click on the package, properties, activation tab) Then you'll have the
option to shutdown.

--
Greg
http://www.claritycon.com/


Quote:
> Greg, Thanks for your response.  I have tried that.  This package does not
> have a start and shutdown menu option when I right click on the package.
> There is something different about this package from the other packages in
> component services, but I don't know what that difference is, only that
> there is no shutdown and start menu option.

> Thanks


> > TonyK, You can shut down your COM+ application with component services
in
> > Windows 2k and XP. Right click on your package and select Shut Down.  If
> you
> > aren't shutting down COM+ it is very possible that that is what is
causing
> > your difficulties.  Is your component called from IIS in any way?  You
> could
> > also try restarting your web if it is because that can hold onto the
dll.
> > None of these should affect the tlb files though.  Are you accessing
your
> > dll from C++ or any other development environments?  If so these could
> have
> > your dll and tlb's open.

> > --
> > Greg
> > http://www.claritycon.com/



> > > I have a C# program using the COM wrapper with is called by Biztalk.

> > > I am having problems rebuilding the application from time to time.  I
> get
> > an
> > > Access denied
> > > message on the DLL and TLB files.

> > > I have had to delete the COM+ component and/or rename the dll and tlb
> > files
> > > and sometimes even
> > > reboot the machine in order to rebuild the application.

> > > I have made certain that Biztalk was shutdown at the time I rebuild.

> > > I have also found that if I delete the COM+ component, that when I do
> get
> > > the app to rebuild that the
> > > COM+ application is not automatically put back into component
services.
> I
> > > have to manully register it with
> > > regsvcs.exe

> > > Is there some way to shutdown my COM+ application?  Is that what is
> using
> > > (access denied in use by another
> > > user) my DLL file?



Wed, 13 Oct 2004 01:03:43 GMT  
 COM wrapper for DLL and rebuild errors - access denied file in use by another user
I have also run in to this problem.  I actually changed the library to run
in process for debugging with .NET.  I have found that after a while it
seems .NET gets a little hosed and needs to have everything cleared out.
Try deleting your application in COM+, Unregister everything about your
component and then run RegClean a couple of times.  Then rebuild you .NET
application, and put your component back in COM+.  This seemed to work for
me.  You might get the same luck.

Regards..


Quote:
> I have a C# program using the COM wrapper with is called by Biztalk.

> I am having problems rebuilding the application from time to time.  I get
an
> Access denied
> message on the DLL and TLB files.

> I have had to delete the COM+ component and/or rename the dll and tlb
files
> and sometimes even
> reboot the machine in order to rebuild the application.

> I have made certain that Biztalk was shutdown at the time I rebuild.

> I have also found that if I delete the COM+ component, that when I do get
> the app to rebuild that the
> COM+ application is not automatically put back into component services.  I
> have to manully register it with
> regsvcs.exe

> Is there some way to shutdown my COM+ application?  Is that what is using
> (access denied in use by another
> user) my DLL file?



Wed, 13 Oct 2004 02:18:07 GMT  
 COM wrapper for DLL and rebuild errors - access denied file in use by another user
Yes, I tried that but then I can't get he de{*filter*} to work.
The next time I get the error I will try changing it from a library package
to a server package, then stopping the component then recompiling.  That may
do the trick.  If not then I'll have to try something else.

Maybe I make it a server package and put this in my code I can debug it:

if(!System.Diagnostics.De{*filter*}.IsAttached)
    System.Diagnostics.De{*filter*}.Launch();


Quote:
> TonyK, is it a library or a server package?  Sounds like it is a library
> package since they don't have the shutdown/start options.  Is there a
reason
> it is a library package?  If not try switching to a server package.
(right
> click on the package, properties, activation tab) Then you'll have the
> option to shutdown.

> --
> Greg
> http://www.*-*-*.com/



> > Greg, Thanks for your response.  I have tried that.  This package does
not
> > have a start and shutdown menu option when I right click on the package.
> > There is something different about this package from the other packages
in
> > component services, but I don't know what that difference is, only that
> > there is no shutdown and start menu option.

> > Thanks


> > > TonyK, You can shut down your COM+ application with component services
> in
> > > Windows 2k and XP. Right click on your package and select Shut Down.
If
> > you
> > > aren't shutting down COM+ it is very possible that that is what is
> causing
> > > your difficulties.  Is your component called from IIS in any way?  You
> > could
> > > also try restarting your web if it is because that can hold onto the
> dll.
> > > None of these should affect the tlb files though.  Are you accessing
> your
> > > dll from C++ or any other development environments?  If so these could
> > have
> > > your dll and tlb's open.

> > > --
> > > Greg
> > > http://www.*-*-*.com/



> > > > I have a C# program using the COM wrapper with is called by Biztalk.

> > > > I am having problems rebuilding the application from time to time.
I
> > get
> > > an
> > > > Access denied
> > > > message on the DLL and TLB files.

> > > > I have had to delete the COM+ component and/or rename the dll and
tlb
> > > files
> > > > and sometimes even
> > > > reboot the machine in order to rebuild the application.

> > > > I have made certain that Biztalk was shutdown at the time I rebuild.

> > > > I have also found that if I delete the COM+ component, that when I
do
> > get
> > > > the app to rebuild that the
> > > > COM+ application is not automatically put back into component
> services.
> > I
> > > > have to manully register it with
> > > > regsvcs.exe

> > > > Is there some way to shutdown my COM+ application?  Is that what is
> > using
> > > > (access denied in use by another
> > > > user) my DLL file?



Wed, 13 Oct 2004 05:01:02 GMT  
 COM wrapper for DLL and rebuild errors - access denied file in use by another user
I'm hoping to avoid going through this much trouble.

Using RegClean is dangerous nowadays.  I run Windows 2000 advanced server as
my Dev machine and everyday use machine.  I run the Office 2000 on this
machine and Regclean cannot be run against a machine using Office 2000, it
deletes registry entries for Office 2000 that need to be there.

This would be an absolute last resort.  However, I have other ideas as I
mentioned in my previous message - change com+ to server package from
library package - shutdown component and rebuild.  It that doesn't work I'll
have to resort to your idea.

Thanks

I hope I never have to run Regclean again or that Microsoft fixes Regclean
for Office 2000.

Quote:
> I have also run in to this problem.  I actually changed the library to run
> in process for debugging with .NET.  I have found that after a while it
> seems .NET gets a little hosed and needs to have everything cleared out.
> Try deleting your application in COM+, Unregister everything about your
> component and then run RegClean a couple of times.  Then rebuild you .NET
> application, and put your component back in COM+.  This seemed to work for
> me.  You might get the same luck.

> Regards..



> > I have a C# program using the COM wrapper with is called by Biztalk.

> > I am having problems rebuilding the application from time to time.  I
get
> an
> > Access denied
> > message on the DLL and TLB files.

> > I have had to delete the COM+ component and/or rename the dll and tlb
> files
> > and sometimes even
> > reboot the machine in order to rebuild the application.

> > I have made certain that Biztalk was shutdown at the time I rebuild.

> > I have also found that if I delete the COM+ component, that when I do
get
> > the app to rebuild that the
> > COM+ application is not automatically put back into component services.
I
> > have to manully register it with
> > regsvcs.exe

> > Is there some way to shutdown my COM+ application?  Is that what is
using
> > (access denied in use by another
> > user) my DLL file?



Wed, 13 Oct 2004 11:48:35 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. MSVCRT.dll access denied error

2. COM secruity .... Access Denied

3. problem getting header file for the COM dll that uses msado15.dll

4. Atl com control permission denied error

5. Compilation error CS0016 "Access denied"

6. not able to kill Exe server...giving access denied error in Win2K

7. SetFileTime: Error 5 Access is Denied

8. CopyFileEX() error: 'Access is denied.'

9. OLE CoCreateInstance (Error 80070005 Access denied)

10. CopyFileEX() error: 'Access is denied.'

11. CreateDirectory() + "Access is denied" -error

12. Service Error Access denied

 

 
Powered by phpBB® Forum Software