VS 2010 WCF Service - MaxItemsInObjectGraph Windows 8
-
Monday, August 20, 2012 11:00 PM
Hello all,
Encountering quite possibly the strangest thing I've seen in a while.
Got a program I built calling a WCF API, Kareo its a medical billing client.
Program runs perfectly on Windows 8. But in all other versions of windows it fails.
"The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter: http://www.kareo.com/api/schemas/:GetPatientsResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota."
While I've seen this error before, I can't figure out why it doesn't affect windows 8 but crashes on all previous versions of windows. Changing the MaxItemsInObjectGraph, also isn't a option as I can't adjust the service end. I discovered this as I worked on the program switching between my laptop running Windows 8 with VS2010 and my main workstation running Windows 7. I've tried a friend's windows 8 RP and it works normally also.
Any ideas?
Thanks, Tim
All Replies
-
Monday, August 20, 2012 11:16 PMModerator
Windows 8 has the .NET Framework 4.5 on it, while W7 had the version 4.0. Some quotas were increased on 4.5, which is likely why you don't see the error on W8, but do on W7.
One thing you can do is to increase that quota in your application explicitly (either via config or in code) so that you won't see this error in any of the configurations.
Carlos Figueira
-
Wednesday, August 22, 2012 3:19 AM
Windows 8 has the .NET Framework 4.5 on it, while W7 had the version 4.0. Some quotas were increased on 4.5, which is likely why you don't see the error on W8, but do on W7.
One thing you can do is to increase that quota in your application explicitly (either via config or in code) so that you won't see this error in any of the configurations.
Carlos Figueira
Strange thing is I'm choosing a .net 3.5 client profile in VS. However I've tried multiple attempts at increasing the quota in the configuration. Haven't had any luck. Doesn't the service side need to be increased then also?
Also thanks very much for the response!
- Edited by Tim-LITech Wednesday, August 22, 2012 3:20 AM
-
Wednesday, August 22, 2012 7:16 AM
have a look at this post - How to resolve maximum message size quote for incoming messagesTanvir Huda Application Architect/Consultant http://thetechnocrate.wordpress.com/
- Marked As Answer by Otomii LuModerator Tuesday, August 28, 2012 9:08 AM
-
Thursday, August 23, 2012 8:34 PM
have a look at this post - How to resolve maximum message size quote for incoming messages
Tanvir Huda Application Architect/Consultant http://thetechnocrate.wordpress.com/
Figured that out and got it into app.config, I'm now getting a new error on first call to the service.
"The type initializer for 'System.ServiceModel.Diagnostics.TraceUtility' threw an exception."
- Marked As Answer by Otomii LuModerator Tuesday, August 28, 2012 9:08 AM
- Unmarked As Answer by Otomii LuModerator Tuesday, August 28, 2012 9:09 AM
-
Thursday, August 23, 2012 10:38 PMModeratorThat's a different error (and for that I'd suggest you open a new thread). Is there any other messages on that (such as an inner exception)? It seems like you may be trying to use tracing, but the tracing system is having some issues.
Carlos Figueira

