Walaa wrote:
Would you please post the exact exception error and stack trace if possible.
In general you can increase the limits in the binding configuration (maxReceivedMessageSize & maxBufferSize).
hello walaa.
i have increased maxReceivedMessageSize & maxBufferSize to maximum (2147483647) but it does not help. the exception is "maximum request length exceeded".
i have had this problem before, which result in very poor performance. by looking on the xml serialization i found that the references from the parent to its child-entities in a 1:n relation (via the collection navigator) causes a problem. because every child has a reference to his parent (must have to set the foreign key in DB) but in the resulting xml in the parent xml element is also a list of all children fully specified once more, so the xml gets very big if there are parents with many children. my solution was to delete the parent to children navigator and the transfer via wcf then was very fast.
but now i can't delete the navigator and there are so many parents with children, that i run in the exception you see below.
if the xml serialization would work with idref instead of fully specified xml elements, everything would be fine!
<Exception>
<ExceptionType>System.ServiceModel.CommunicationException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>maximum request length exceeded</Message>
<StackTrace>
bei System.ServiceModel.Activation.HostedHttpRequestAsyncResult.GetInputStream()
bei System.ServiceModel.Activation.HostedHttpContext.HostedHttpInput.HostedInputStream..ctor(HostedHttpContext hostedContext)
bei System.ServiceModel.Activation.HostedHttpContext.HostedHttpInput.GetInputStream()
bei System.ServiceModel.Channels.HttpInput.get_InputStream()
bei System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(Exception& requestException)
bei System.ServiceModel.Channels.HttpRequestContext.CreateMessage()
bei System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(HttpRequestContext context, ItemDequeuedCallback callback)
bei System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
bei System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
bei System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
bei System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
bei System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
bei System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
bei System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
bei System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)
bei System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
bei System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
bei System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
</StackTrace>
<ExceptionString>System.ServiceModel.CommunicationException: maximum request length exceeded. ---> System.Web.HttpException: maximum request length exceeded.
bei System.Web.HttpRequest.GetEntireRawContent()
bei System.Web.HttpRequest.get_InputStream()
bei System.ServiceModel.Activation.HostedHttpRequestAsyncResult.GetInputStream()
--- Ende der internen Ausnahmestapelüberwachung ---</ExceptionString>
<InnerException>
<ExceptionType>System.Web.HttpException, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</ExceptionType>
<Message>Maximale Anforderungslänge überschritten.</Message>
<StackTrace>
bei System.Web.HttpRequest.GetEntireRawContent()
bei System.Web.HttpRequest.get_InputStream()
bei System.ServiceModel.Activation.HostedHttpRequestAsyncResult.GetInputStream()
</StackTrace>
<ExceptionString>System.Web.HttpException: Maximale Anforderungslänge überschritten.
bei System.Web.HttpRequest.GetEntireRawContent()
bei System.Web.HttpRequest.get_InputStream()
bei System.ServiceModel.Activation.HostedHttpRequestAsyncResult.GetInputStream()</ExceptionString>
</InnerException>
</Exception>