Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6918501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:52:03+00:00 2026-05-27T09:52:03+00:00

I get a timeout exception whenever trying to connect to my selfhosted wcf. This

  • 0

I get a timeout exception whenever trying to connect to my selfhosted wcf.

This is config I have:

<configuration>
  <system.serviceModel>        
    <behaviors>
        <serviceBehaviors>
            <behavior name="MetaBehaviour">
                <serviceMetadata />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <services>
        <service behaviorConfiguration="MetaBehaviour" name="WcfStreaming.LargeDataService">
            <clear />
            <endpoint address="net.tcp://localhost/LargeData" binding="netTcpBinding"
                name="Tcp" contract="WcfStreaming.ILargeDataService" listenUriMode="Explicit" />
            <endpoint address="net.tcp://localhost/LargeData/mex" binding="mexTcpBinding"
                name="TcpMex" contract="IMetadataExchange" listenUriMode="Explicit" />
            <endpoint address="http://localhost/wcfstreaming" binding="basicHttpBinding"
                bindingConfiguration="" name="BasicHttp" contract="WcfStreaming.ILargeDataService" />
        </service>
     </services>
  </system.serviceModel>
</configuration>

And here is hosting code:

 host = new ServiceHost(typeof(WcfStreaming.LargeDataService),
           new Uri[] { HttpUri, TcpUri });

 host.Open();

 var factory = new ChannelFactory<WcfStreaming.ILargeDataService>(new NetTcpBinding(), new EndpointAddress(TcpUri)); //  Hnew NetTcpBinding(), new EndpointAddress(TcpUri));

 srvChannel = factory.CreateChannel();

 using (OpenFileDialog dlg = new OpenFileDialog())
 {
    if (dlg.ShowDialog() == DialogResult.OK)
    {
       Stream str = srvChannel.GetFile(dlg.FileName); //Exception here

       StreamReader sr = new StreamReader(str);
       string bf = sr.ReadToEnd();
       File.WriteAllText(@"C:\test", bf);
    }
 }

I get nasty:

This request operation sent to net.tcp://localhost/LargeData 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:52:03+00:00Added an answer on May 27, 2026 at 9:52 am

    you can add wcf tracing by placing the following in your app.config file ( the project calling your wcf service, not the wcf service app.config file ). The trace is dumped out to c:\wcf.svclog

    <system.diagnostics>
          <sources>
            <source name="System.ServiceModel"
                    switchValue="Information, Warning, ActivityTracing, Error, Critical"
                    propagateActivity="true">
              <listeners>
                <add name="traceListener"
                    type="System.Diagnostics.XmlWriterTraceListener"
                    initializeData= "c:\wcf.svclog" />
              </listeners>
            </source>
          </sources>
        </system.diagnostics>
    

    Also if it is running under VS, but not outside of it, it means the servicehost you are creating doesnt match the service endpoint defined in your app.config file ( again the config file for the project calling the wcf, not the wcf’s app.config file). OR the servicehost instantiation code never gets run.

    It runs under VS becasue VS by default creates a WCF debugging host that loads your wcf service and exposes both the service and the MEX url. Sometimes this debugging aid keeps running if your application crashes. the process is wcfsvchost.exe.

    “Mex” allows you to get the meta data on the service, so it is not needed for the final program.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to call Close or Dispose on an SqlDataReader i get a timeout
I get an exception whenever I try getting context parameter from we.XML into a
Say we've got a class like public class Doer { public int Timeout {get;set;}
I want to get hold of the mouse position in a timeout callback. As
I can't seem to get the correct Unix epoch time out of this PHP
I'm using Tomcat 7, MySql Workbench 5.2.27, JSF 2.0 and this exception comes from
I have client-server application, where server side is Azure WCF service with data in
When calling context.SaveChange() , I get an exception: {An error occurred while updating the
I am having the standard issue timeout exception in my production environment whereby, after
I am trying to get the result of the following json webservice https://mtgox.com/code/data/getDepth.php into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.