Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having one problem.When I send request to server using WCF i get exception of

"Underlying connection closed
This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server "

I checked in wcf trace log and found that error was due to MaxItemsInObjectgraph exceeded more than 65536.But in my server side config file and in client side config file I have given MaxItemsInObjectgraph more than 65536 which is 2147483647.But still it gives error.Than I tried to give MaxItemsInObjectgraph value through code so wrote in service class as

C#
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(MaxItemsInObjectGraph = 2147483647)]
    public class CustomerAnalyzeService : ICustomerAnalyze
    {.....something
;

my servieContract part is interface that I have inherited.In that I have used operationContract.

but this is also not working.How should I solve this error.
Posted
Comments
Sergey Alexandrovich Kryukov 3-Dec-12 14:33pm    
You explained what was "not working" in first case. But what happened in the second case, when you used 2147483647?
--SA
jaideep06.jd 7-Dec-12 7:19am    
I got same error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900