-3

Getting this message:

This request operation sent to net.pipe://127.0.0.1/MyService did not receive a reply within the configured timeout (00:01:00). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.

Any ideas, why it can happen?

UPD: my server code doesn't hang. I have the same exception, even when that server method is empty. Actually, it doesn't event gets called, log message in it's beginning is never shown and breakpoint never is hit.

UPD2: my code is extremely simple, and it runs ok inside isolated test app

    private static void ServerStart(string channelUri)
    {
        var host = new ServiceHost(typeof(Service), new Uri(channelUri));
        host.AddServiceEndpoint(typeof(IServiceContract),
          new NetNamedPipeBinding(NetNamedPipeSecurityMode.Transport),
          new Uri(channelUri));
        host.Open();
    }

    private static void ClientStart(string channelUri)
    {
        var factory = new ChannelFactory<IServiceContract>
              (new NetNamedPipeBinding(), new EndpointAddress(channelUri));
        var proxy = factory.CreateChannel();

        proxy.StartOnServer();
    }
user626528
  • 13,999
  • 30
  • 78
  • 146

2 Answers2

1

You have exceed the default timeout Change your binding or make your operation complete more quickly. Take a look at this question.


With your update you still have a configuration issue. If your server code isn't being called but your not getting a open exception you need to turn on full tracing and use the SVC trace viewer. You can also hook into the services host events to see when calls come in. If you post your sever and client configuration we may be able to help more.

Community
  • 1
  • 1
rerun
  • 25,014
  • 6
  • 48
  • 78
  • You are wrong. See update plz. – user626528 Jun 06 '11 at 15:10
  • The same code runs ok, when I run it in the isolated test app. But my real app is hosted in another (native) program. Any ideas, how to trace/debug the problem? – user626528 Jun 06 '11 at 15:26
  • So you client is attempting to initiate the connection and then start the service host ? – rerun Jun 06 '11 at 16:13
  • 1
    @rerun, server is started before any client calls. – user626528 Jun 06 '11 at 16:22
  • how are you hosting the WCF service? In a console app? Is the client in a separate program? – Sam Holder Jun 06 '11 at 16:36
  • @Sam Holder, actually both client and server are in the same process, but in different app domains. Process is started from a native app and then loads several CLR app domains. – user626528 Jun 06 '11 at 16:42
  • I'd concentrate on getting to the point where you can debug the service before worrying about the cause of this issue, as the exception you are getting is a timeout, so maybe its related to some issue with the setup. Once you can see the code flow from the client to the server and back again with a simple method, then you will probably have much more luck solving this. – Sam Holder Jun 06 '11 at 17:16
  • @Sam Holder, what I need to debug? My code calls proxy.StartOnServer(), and never gets inside that method on the server-side. – user626528 Jun 07 '11 at 04:36
0

Is your method taking longer than 1 minute to execute on the server?

this timeout is what would happen if that was the case...

you can set this on the configuration of the endpoint in the client...

<binding name="BasicHttpBinding_Binding" closeTimeout="10:01:00" openTimeout="10:01:00" receiveTimeout="10:10:00" .../>
Sam Holder
  • 32,535
  • 13
  • 101
  • 181