My WCF:
AS soon as I invoke GetDownpayments () on client side I get:
There's nothing wrong with timeout, that's fo sure. Table to be returned is rather small - about 10 rows with 20 values in each. All other functions in IWorkbookServic e work flawlessly, even with much more size of transferred data.
What's wrong to my code?
Code:
[ServiceContract]
public interface IWorkbookService
{
[OperationContract]
DataTable GetDownpayments(KeyValuePair<int, string> sgm);
}
class WorkbookService : IWorkbookService
{
public DataTable GetDownpayments(KeyValuePair<int, string> sgm)
{
/// works fine, no exceptions here
return Common.GetDownpayments(selectedSegment);
}
}
AS soon as I invoke GetDownpayments () on client side I get:
System.ServiceM odel.Communicat ionException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:02:59.84300 00'. ---> System.IO.IOExc eption: The read operation failed, see inner exception. ---> System.ServiceM odel.Communicat ionException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:02:59.84300 00'. ---> System.Net.Sock ets.SocketExcep tion: An existing connection was forcibly closed by the remote host
at System.Net.Sock ets.Socket.Rece ive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.ServiceM odel.Channels.S ocketConnection .ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
--- End of inner exception stack trace ---
at System.ServiceM odel.Channels.S ocketConnection .ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
at System.ServiceM odel.Channels.S ocketConnection .Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceM odel.Channels.D elegatingConnec tion.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceM odel.Channels.C onnectionStream .Read(Byte[] buffer, Int32 offset, Int32 count, TimeSpan timeout)
at System.ServiceM odel.Channels.C onnectionStream .Read(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Fixe dSizeReader.Rea dPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Secu rity.NegotiateS tream.StartFram eHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRe quest asyncRequest)
at System.Net.Secu rity.NegotiateS tream.StartRead ing(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRe quest asyncRequest)
at System.Net.Secu rity.NegotiateS tream.ProcessRe ad(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRe quest asyncRequest)
--- End of inner exception stack trace ---
at System.Net.Secu rity.NegotiateS tream.ProcessRe ad(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRe quest asyncRequest)
at System.Net.Secu rity.NegotiateS tream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceM odel.Channels.S treamConnection .Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceM odel.Channels.S treamConnection .Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceM odel.Channels.S essionConnectio nReader.Receive (TimeSpan timeout)
at System.ServiceM odel.Channels.S ynchronizedMess ageSource.Recei ve(TimeSpan timeout)
at System.ServiceM odel.Channels.F ramingDuplexSes sionChannel.Rec eive(TimeSpan timeout)
at System.ServiceM odel.Channels.F ramingDuplexSes sionChannel.Try Receive(TimeSpa n timeout, Message& message)
at System.ServiceM odel.Dispatcher .DuplexChannelB inder.Request(M essage message, TimeSpan timeout)
at System.ServiceM odel.Channels.S erviceChannel.C all(String action, Boolean oneway, ProxyOperationR untime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceM odel.Channels.S erviceChannel.C all(String action, Boolean oneway, ProxyOperationR untime operation, Object[] ins, Object[] outs)
at System.ServiceM odel.Channels.S erviceChannelPr oxy.InvokeServi ce(IMethodCallM essage methodCall, ProxyOperationR untime operation)
at System.ServiceM odel.Channels.S erviceChannelPr oxy.Invoke(IMes sage message)
Exception rethrown at [0]:
at System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage reqMsg, IMessage retMsg)
at System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData& msgData, Int32 type)
at DSSIP_Test.Serv iceReference1.I WorkbookService .GetDownpayment s(KeyValuePair` 2 selectedSegment )
at DSSIP_Test.Serv iceReference1.W orkbookServiceC lient.GetDownpa yments(KeyValue Pair`2 selectedSegment ) in C:\PRJ\DSSIP_Te st\Service References\Serv iceReference1\R eference.cs:lin e 205
at System.Net.Sock ets.Socket.Rece ive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.ServiceM odel.Channels.S ocketConnection .ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
--- End of inner exception stack trace ---
at System.ServiceM odel.Channels.S ocketConnection .ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
at System.ServiceM odel.Channels.S ocketConnection .Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceM odel.Channels.D elegatingConnec tion.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceM odel.Channels.C onnectionStream .Read(Byte[] buffer, Int32 offset, Int32 count, TimeSpan timeout)
at System.ServiceM odel.Channels.C onnectionStream .Read(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Fixe dSizeReader.Rea dPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Secu rity.NegotiateS tream.StartFram eHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRe quest asyncRequest)
at System.Net.Secu rity.NegotiateS tream.StartRead ing(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRe quest asyncRequest)
at System.Net.Secu rity.NegotiateS tream.ProcessRe ad(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRe quest asyncRequest)
--- End of inner exception stack trace ---
at System.Net.Secu rity.NegotiateS tream.ProcessRe ad(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRe quest asyncRequest)
at System.Net.Secu rity.NegotiateS tream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceM odel.Channels.S treamConnection .Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceM odel.Channels.S treamConnection .Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceM odel.Channels.S essionConnectio nReader.Receive (TimeSpan timeout)
at System.ServiceM odel.Channels.S ynchronizedMess ageSource.Recei ve(TimeSpan timeout)
at System.ServiceM odel.Channels.F ramingDuplexSes sionChannel.Rec eive(TimeSpan timeout)
at System.ServiceM odel.Channels.F ramingDuplexSes sionChannel.Try Receive(TimeSpa n timeout, Message& message)
at System.ServiceM odel.Dispatcher .DuplexChannelB inder.Request(M essage message, TimeSpan timeout)
at System.ServiceM odel.Channels.S erviceChannel.C all(String action, Boolean oneway, ProxyOperationR untime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceM odel.Channels.S erviceChannel.C all(String action, Boolean oneway, ProxyOperationR untime operation, Object[] ins, Object[] outs)
at System.ServiceM odel.Channels.S erviceChannelPr oxy.InvokeServi ce(IMethodCallM essage methodCall, ProxyOperationR untime operation)
at System.ServiceM odel.Channels.S erviceChannelPr oxy.Invoke(IMes sage message)
Exception rethrown at [0]:
at System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessage reqMsg, IMessage retMsg)
at System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData& msgData, Int32 type)
at DSSIP_Test.Serv iceReference1.I WorkbookService .GetDownpayment s(KeyValuePair` 2 selectedSegment )
at DSSIP_Test.Serv iceReference1.W orkbookServiceC lient.GetDownpa yments(KeyValue Pair`2 selectedSegment ) in C:\PRJ\DSSIP_Te st\Service References\Serv iceReference1\R eference.cs:lin e 205
What's wrong to my code?
Comment