WCF Session problem -


I'm new to WCF and I do not have much idea. Using the sample code I tried WCF via Remoting ...

It works fine for a few minutes but if I leave the client without access to the WCF server, then I Like an exception.

Exception: Unable to connect to remote server.

Internal Exception:

System.Net.Sockets.SocketException: The connection attempt was unsuccessful because the connected side did not perform the operation after a period of time, or the established connection failed because connected host 122.165.27.38:80 to react

System.Net.Sockets.Socket.DoConnect (EndPoint endPointSnapshot, socketAddress socketAddress) has failed the

System on .Net.Sockets.Socket.InternalConnect (EndPoint remoteEP)

System.Net.ServicePoint.ConnectSocketInternal on (Boolean connectFailure, socket S4, S6 socket, socket & amp, socket, IPAddress & amp; address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception & amp; exceptions)

Stack trace:

System.Net.HttpWebRequest.GetRequestStr on EAM ( )

[(string methodName, object System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke] parameter)

on TeleMailer.TeleMailer.cbxtmuname_SelectedIndexChanged (object sender, EventArgs e) < / P>

source:

system

Exception: The server was unable to process the request. ---> Communications Object, System Servicemodel. Channel. The service channel can not be used for communication because it is in the wrong position.

Internal Exception:

Stack Trace:

System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse (SoapClientMessage Message, WebResponse response, stream responseStream, Boolean asyncCall) on

on SystemkWebkServiceskProtocolskSoapHttpClientProtocolkInvoke (string methodName, object [] parameters)

TeleMailer.Server.Service.get_path on () < / P>

TeleMailer.TeleMailer.TeleMailer_Load (on object sender, EventArgs e)

source:

system. Web. Services

But it is not in a state of mistake or it is closed!

In fact, the customer communicates in my application which is in contact with the WCF on the server and gives it the task to do it ....

Right now, I have Cassini on my server form It works very well for a few minutes but after about ten minutes it only shows this error message .... but if I restart my cassini then it should be properly done for a few minutes Works properly and gets the problem I cant understand that when it comes to a faulty situation when it is able to connect more customers ....

Is that so? Is it because the session time has expired or what? And if the session has expired, then from my server or client ???

Any Idea Plaz ..........

I sat down for this whole day, but could not find anything!

This can be a timeout problem, when you create a wcf proxy object in your client code. The

It seems that when you start the client and then just use it again so there's proxy object to make it maintain a connection to the object server monitors, which expire after 10 minutes it happens.

A better way to do this is to create a new proxy object every time you need it, with the using statement.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -