Here's my setup:
Component A: .NET exe acting as a .NET remoting server. The channel type is
tcp.
Component B: .NET assembly acting as a .NET remoting client with event
handlers for server broadcasts. Also exposes an interface to COM.
Component C: C++ out of process COM exe which uses component B via COM.
Component D: C++ exe which uses component C via COM.
Here's the problem: While A is running, D is started, which starts C, which
calls a function in B. This function initializes the client remoting, and
establishes a connection with a SAO in A. This SAO (singleton) has a
delegate to which I then try to attach an event handler. At this point, an
ApplicationException is thrown with the message "Access is denied".
However, if C is started independantly first, and then D is started, the
error does not occur. It seems that perhaps C is running in a different
security context in each case. How do I resolve this problem so that I can
get the desired operation under the former scenario?
It should be noted as well that placing a call in D to either ShellExecute
or CreateProcess to start C also works, but this is not the desired
solution.
I am using the style of event handling as described in chapter 6 of
"Advanced .NET Remoting" by Ingo Rammer. Source code from this book can be
downloaded here:
http://www.apress.com/book/supplemen...bID=47&sID=374
Please help!
Matt