TimeOut Exception Error for WCF Client Application

  • Thread starter Alex. O. Koranteng
  • Start date
A

Alex. O. Koranteng

I have a windows form on my windows client application. The event handler for
the button will read the contents of a text file. I am getting the error
below. The servicehost is running okay.

{"The open operation did not complete within the allotted timeout of
00:01:00. The time allotted to this operation may have been a portion of a
longer timeout."}

Below is the code for the button. I need some suggestions and help.

namespace WCFClientApp
{
public partial class Form1 : Form
{
private int _Selection;

public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
switch (_Selection)
{
case 0:
TCP.ServiceClassClient client = new

WCFClientApp.TCP.ServiceClassClient("NetTcpBinding_IServiceClass");
textBox1.Text = client.GetText();
break;

case 1:
NamedPipe.ServiceClassClient client1 = new

WCFClientApp.NamedPipe.ServiceClassClient("NetNamedPipeBinding_IServiceClass");
textBox1.Text = client1.GetText();
break;

case 2:
break;
}
}

private void button2_Click(object sender, EventArgs e)
{
switch (_Selection)
{
case 0:
TCP.ServiceClassClient client = new

WCFClientApp.TCP.ServiceClassClient("NetTcpBinding_IServiceClass");
textBox2.Text = client.MultiplyNumbers(5, 5).ToString();
break;

case 1:
NamedPipe.ServiceClassClient client1 = new

WCFClientApp.NamedPipe.ServiceClassClient("NetNamedPipeBinding_IServiceClass");
textBox2.Text = client1.MultiplyNumbers(5, 5).ToString();
break;

case 2:
break;
}
}

private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
_Selection = 0;
textBox2.Text = "";
textBox1.Text = "";
}

private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
_Selection = 1;
textBox2.Text = "";
textBox1.Text = "";
}
}
}
 
M

Mr. Arnold

Alex. O. Koranteng said:
I have a windows form on my windows client application. The event handler
for
the button will read the contents of a text file. I am getting the error
below. The servicehost is running okay.

{"The open operation did not complete within the allotted timeout of
00:01:00. The time allotted to this operation may have been a portion of a
longer timeout."}

Well, you need to find out how to set the timeout properties of WCF solution
to increase the default timeouts, which can be done on the client side
programmically or with a client side App.Config or a Web.config. You will
most likely have to do it on the server side of the WCF solution too,
increase timeout times, with its app.config or web.config, giving new
bindings. Otherwise, it may timeout on the server side when sending data
back to the client.
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4218 (20090705) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top