I have a WCF service and an simple aspx page that gets the message from one console application and sends it to the another console application. When the message(xml formatted) length is around 6000000, it works fine, however when the message size is doubled, it stops throwing the following exception
"The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state."
I have tracked it and my sender app sends the message, my .aspx page gets it, exception is thrown at sending it to my receiver app. Here is the code.
public void SendMessage(string message)
{
try
{
using (Receiver rec = new Receiver())
{
rec.SetMessage(message);
}
}
catch (Exception e)
{
Response.Write(e.Message);
Response.Write(e.StackTrace);
}
}
I tried bunch of config settings but none solved the issue. What might be the reason?
Thanks in advance.