COM Interop registration failed. Access is denied???

G

Guest

Hello

Thanks for reviewing my question. I am writing a shared Office AddIn that uses a couple of user controls on a form and from time to time I receive this error "COM Interop registration failed. Access is denied." The only way I have found around this is exit VS.NET and restart it. When debugging, I have VS.NET launch Excel in order to load my shared AddIn. Any clues what is causing this? Is Excel not shutdown

Many Thank
Peter
 
J

Jason Newell

Peter,
I had the exact same problem. Everything I read on the internet did not
help. My problem ended up being Sophos Anti-Virus. I turned it off and
everything was good in Mayberry again. HTH

--
Jason Newell
Software Engineer
The Charles Machine Works, Inc.


Peter said:
Hello,

Thanks for reviewing my question. I am writing a shared Office AddIn that
uses a couple of user controls on a form and from time to time I receive
this error "COM Interop registration failed. Access is denied." The only
way I have found around this is exit VS.NET and restart it. When debugging,
I have VS.NET launch Excel in order to load my shared AddIn. Any clues what
is causing this? Is Excel not shutdown.
 
S

Sam Gentile [MVP - C#/.NET]

The Access Is Denied message is when the Interop Assembly is in use (or
could be if marked read-only but since it works when you get out it can't be
this). When do you receive this message? What are you doing when it happens?
It sounds like you are using VS.NET to create the RCW/Interop assembly for
Excel. If so, Excel can't be running when you try to create the IA as the
DLL will be in use. I'm not sure but I need to know more about what you are
doing to help you.

--
-----
Sam Gentile
Microsoft MVP - C#/.NET
..NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
 

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