tags:

views:

130

answers:

2

I have one computer acting as a WCF service host. a client machine will have multiple client processes running, each also hosting WCF services on separate ports (5601, 5602, etc.). The client processes will handshake the host. Once the handshake is received, the host will send back some data. The client processes are spawned one after another, as directed by a separate method on the host machine. However, I keep getting the following exception after starting more than one instance:

The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

Yet, when I add delay between the spawns, there appears to be no problem. What would be causing this, and how should I fix it?

spawns processes on the remote system which immediately try to handshake with the controller service on the main system.

        target.InitiateTestProcess(a);
        //System.Threading.Thread.Sleep(1000);
        target.InitiateTestProcess(b);

And for the handshake

    public void Handshake(Uri connectBack)
    {
        IWorkerContract client = ChannelFactory<IWorkerContract>.CreateChannel(
            new BasicHttpBinding(),
            new EndpointAddress(new Uri(connectBack, "Worker")));

        client.PassUUT(clients[connectBack]);
    }

Please comment if additional info is needed and I'll try to address your questions to the best of my abilities.

A: 

Juste a question, why did you user multiple port ?

Why your host dont listen only one port ?

Cédric Boivin
I believe that this connection is 1:many AND many:1
Firoso
That's correct, there is one primary host, but many clients running on a separate machine. Each client needs to be addressed individually.
MGSoto
A: 

I solved the problem, I enabled IncludeExceptionDetailInFaults consumers so they would report back exception details. The workers were creating and reading files, often the same file (With testing, it was always the same file), and there was occasionally a collision when two+ processes would try to read the same file.

MGSoto