COM Interop registration failed

A

Alex

I am writing a Word add-in in C# (VS 2003).

Every once in a while my compiles start failing with the following:

Building satellite assemblies...
Registering project output for COM Interop...
COM Interop registration failed. Access is denied.

If I restart VS, the error disappears for a while then, after several compiles, manifests again.

Any idea what is happening?

Thanks,
Alex.
 
P

Peter Huang [MSFT]

Hi

I think you may try to use the regmon and filemon to monitor if there is
any access denied when we encounter the issue.
http://www.sysinternals.com/ntw2k/source/filemon.shtml
http://www.sysinternals.com/ntw2k/source/regmon.shtml

Based on my experience, it seems that other application is held the tlb
file the VS,NET IDE generated which will be used by the Word to load addin.
Please perform the regmon and filemon to see where the error occurred.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Alex

"Peter Huang" said:
Hi

I think you may try to use the regmon and filemon to monitor if there is
any access denied when we encounter the issue.

Of course there is an "accsess denied", that was what the compiler complained about!
The error happens on the MyAddin1.tlb file but, according to Process Explorer, the only one who holds it is devenv.exe !

Best regards,
Alex.
 
P

Peter Huang [MSFT]

Hi

I am sorry if I did not make it clear.
When we compile the project and try to register for com interop.
In addion to generate the dll and tlb file, the IDE will also need to write
the related register key into registry.
That's why suggest you use both regmon and filemon to see if the only
"access denied" is caused by the face that only the IDE process is holding
the tlb file.

From your reply, we assume now the only access denied is caused by the IDE
held the reference to the tlb file.
If so, I think you may also try to disable all the document view,e.g. *.cs
file and disable all the addin and restart the VS.NET IDE and then try to
rebuild the solution for a few times to see if the problem persists.
If yes, I think we need to do further trouble shooting, can you help to
give a simple reprodcue sample together with detailed reproduce steps so
that we can duplicate the problem at our side to do futher troubleshooting.

I will appreciate your efforts!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Alex

Hello Peter,

"Peter Huang" said:
From your reply, we assume now the only access denied is caused by the IDE
held the reference to the tlb file.

That is correct.
If so, I think you may also try to disable all the document view,e.g. *.cs
file and disable all the addin

Sorry, I don't follow you.
and restart the VS.NET IDE and then try to
rebuild the solution for a few times to see if the problem persists.

As I said in the original post, restarting the IDE helps, temporarily.
After several recompiles, the problem happens again.
If yes, I think we need to do further trouble shooting, can you help to
give a simple reprodcue sample together with detailed reproduce steps so
that we can duplicate the problem at our side to do futher troubleshooting.

I don't have a reproducible scenario, it seems sporadic.
Everything works fine, until it doesn't...

Best regards,
Alex.
 
P

Peter Huang [MSFT]

Hi

Thanks for your quickly reply!
Since the problem is hard to reproduce, if you do want to find the root
cause I suggest you try to contact MSPSS via the link below, because for
your scenario, we need do dump anaylysis or live debugging which is
provided by the MSPSS.
http://support.microsoft.com

Thanks for your understanding!
If you still have any other concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top