none
DCOM affecting my WCF functionality RRS feed

  • Question

  • Hello,

        I have written my issue on the Code Project website in which I am encountering security problems in an executable that is invoked remotely using DCOM.    This is an OPC application in which an executable is started to browse tags in our system.   

        I have performed DCOM configuration with other applications on my test computer but my specific application is adversely affected by having the process invoked via DCOM.    My DCOM configuration uses Default authentication and runs the process as the launching user.    I have synchronized user names and passwords on the local and invoking PCs.

         When I run my client locally and my process is started with COM, my WCF worked correctly.    However when invoked remotely using DCOM, I cannot connect using a named pipe client channel.    It fails with an EndpointNotFoundException stating 'There was no endpoint listening at net.pipe://localhost/<Address>".     This mirrors the fact that I am not operating using 'Run as Administrator' permissions which means that I am looking in the local user namespace for the endpoint.      I attempted to replace with named pipe connection with a TCP connection that used port sharing.     Then I received an error message of 

    "The service endpoint failed to listen on the URI because access was denied.  Verify that the current user is granted access in the
    appropriate allowAccounts section of SMSvcHost.exe.config."

    This again seems to be indicative of a lack of Admistrative privileges.    I attempted to spawn another process using the following code:

    _communicatorProcess = new Process()
    _communicatorProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    _communicatorProcess.StartInfo.FileName = "DaServer.exe";
    _communicatorProcess.StartInfo.UseShellExecute = false;
    _communicatorProcess.StartInfo.RedirectStandardError = true;
    _communicatorProcess.StartInfo.RedirectStandardOutput = true;
    _communicatorProcess.StartInfo.StartInfo.CreateNoWindow = true;
    _communicatorProcess.StartInfo.Verb = "runas";  // To elevate privileges
    _communicatorProcess.StartInfo.Arguments = "-" + _serverGuid.ToString();
    
    _communicatorProcess.Start();

    The same permission issues are appearing in this child process which I attempted to elevate privileges.   Is these a way to elevate my privileges in this child process that I am not already doing?   Do I need to add a manifest file?


    Thursday, July 16, 2015 10:23 PM

All replies