2

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.

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

8 Comments

Fiddler returns a 504 with a message of [Fiddler] ReadResponse() failed: The server did not return a response for this request
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.
I also have everything in the config set to the max of 2147438647 for now.
Try enabling tracing - msdn.microsoft.com/en-us/library/ms733025.aspx - at the server. The traces should have an entry for this issue.
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>
|
0

check the in your web.config..make sure you have this

<system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="4294967295"/> 
      </requestFiltering>
    </security>
  </system.webServer>

the maxAllowedContentLength limits/sets the uploading size..

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.