Hi,
We are facing problem in transferring the file of size 25 mb from one service to another wcf service that reside on different server.
we are getting an error
"There was no endpoint listening at http://xyz that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."
And inner exception as
" The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)"
at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)"
However we are able to transfer small files having size upto 1MB.
The configuration we used are as follows:
<binding name="abc" closeTimeout="00:10:00" receiveTimeout="00:10:00"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxBytesPerRead="4096" maxDepth="2147483647" maxArrayLength="2147483647"/>
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxBytesPerRead="4096" maxDepth="2147483647" maxArrayLength="2147483647"/>
Anyone faced the similar kind of problem, or having any idea on this problem, please provide your inputs.
-Arora.
SOLUTION 1:
When you send the large amount of data via WCF it is possible to do it via 2 options.
1. Enabling MTOM: When we need to send large binary data and we need interoperability also, then for BinaryHttpBinding or WSHttpBinding we can send messageEncoding property to “Mtom”.
2. Streaming Data Mode: When we need to transfer large amount of data, streaming transfer mode is a feasible option. This can be achieved by setting transferMode property to “Streamed”/ “StreamedResponse”/”StreamedRequest” based on the requirement.
Please see following links for reference.
Thanks & Regards,
Maninder
No comments:
Post a Comment