I've implemented a web services that saves and loads text data and image (byte array) into a SQL Server. For to send data, I'm modified the web.config because i received an error for data too big!!!
This is the modify of my web.config:
<services>
<service name="myWs_service.Service1">
<endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttp_LargeObject" contract="myWs_service.Ib2bService" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="BasicHttp_LargeObject" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None"/>
</binding>
</basicHttpBinding>
</bindings>
...and also this:
<httpRuntime targetFramework="4.5" maxRequestLength="409600" executionTimeout="900"/>
So now I can send all desidered data to the web service, but when I try to retrieve data, I get an error on the MaxReceivedMessageSize configuration!?!?!
Why I can send from client to server and I can't receive from server to client with this configuration?
I will appreciate all suggestions....
EDIT
For greater clarity:
The real client app is a Windows App Store app than actually works good when I need to post data.
For now I'm testing the app with the console for debug mode:
and the error message (sorry is in italian) that I retrieve is:
È stata superata la quota massima delle dimensioni per i messaggi in ingresso (65536). Per aumentare la quota, utilizzare la proprietà MaxReceivedMessageSize nell'elemento associazione appropriato.
Server stack trace:
in System.ServiceModel.Channels.MessageEncoder.BufferMessageStream(Stream stream, BufferManager bufferManager, Int32 maxBufferSize)
in System.ServiceModel.Channels.MessageEncoder.ReadMessage(Stream stream, BufferManager bufferManager, Int32 maxBufferSize, String contentType)
in System.ServiceModel.Channels.HttpInput.ReadChunkedBufferedMessage(Stream inputStream)
in System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(HttpRequestMessage httpRequestMessage, Exception& requestException)
in System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
in System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
in System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
in System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
in System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
in System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
in System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
in Ib2bService.listAziende()
in Ib2bServiceClient.listAziende()
Inner Exception:
È stata superata la quota massima delle dimensioni per i messaggi in ingresso (65536). Per aumentare la quota, utilizzare la proprietà MaxReceivedMessageSize nell'elemento associazione appropriato.