المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Communication with DCOM Server



C# Programming
10-07-2010, 01:21 AM
Hello everybody,

I am doing a application which needs to communicates with a DCOM server. I created a .NET wrapper using tlbimp.exe and referenced it in my C# program.

I then create an Object from my remote server using Activator.CreateInstance("Objectdd.obj","ServerNAME"); and cast the returned object to the correct type in the .NET wrapper class.

Until here everything is working fine, I can call method on my object from C# and the call is correctly executed on the remote machine.

The problem is, as soon as I try to connect to an event from C#, I got a System.UnauthorizedAccesException. This is strange because I can call every others method with no problems. I also tried my C# software on the server, using "localhost" as server address and I could connect to the event correctly.

Any ideas what's wrong ? Any security problems I am missing ?

Thank you,