I have a WCF web service that is building up data into classes and then serialized automatically by WCF to JSON ( [WebGet(ResponseFormat = WebMessageFormat.Json,...)] and returning to the client. Everything works great until I have a very large amount of data. I have the web config settings maxed as 2147438647. The odd thing is that the classes are populated and are not null just before being passed back by the WCF service. However the client never receives the data nor an error message and IIS/WCF do not throw any type of exception. It is as if the data just disappears in thin air.
Add a comment
|
2 Answers
What do you mean by "the client never receives the data"? The connection is dropped? It receives a response with 0 bytes?
There are many quotas in WCF, but they're mostly for incoming data. There's one for outgoing data, which you may be hitting, which is the maxItemsInObjectGraph, which could be triggered for large object graphs. You should enable tracing in the server, and the traces should have an exception event which could shed some light on what the problem is.
8 Comments
econner
Fiddler returns a 504 with a message of [Fiddler] ReadResponse() failed: The server did not return a response for this request
econner
I also tested with the live application that uses the web service and also the REST client in FireFox to execute a call to the WCF web service. The call hits the server (running in debug mode and stepped thru code) and everything generated as expected and the class containing data (checked properties in debug mode) returned to the WCF call. The REST client never receives the JSON serialized data back from the WCF service nor a response status or header from the server. The request goes out, the server generates the data and the serialization doesn't seem to happen and no response is sent back.
econner
I also have everything in the config set to the max of 2147438647 for now.
carlosfigueira
Try enabling tracing - msdn.microsoft.com/en-us/library/ms733025.aspx - at the server. The traces should have an entry for this issue.
econner
I added the following to the web.config and a log file was not created when the process failed. Did I miss something in the setup? <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true"> <listeners> <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\log\Traces.svclog" /> </listeners> </source> </sources> </system.diagnostics>
|