c# - The underlying connection was closed - webAPI ,WCF -


i have rest service calling wcf service. method in wcf service returns data expected. here json format of c#object.

 [             {                 "$id": "1",                 "children": [],                 "id": 1,                 "name": "1",                 "owner": {                     "userid": 1,                     "username": "testuser",                     "firstname": null,                     "lastname": null                 },                 "parent": null,                 "permissions": [],                 "type": 0             }         ] 

when there complex object wcf service throwing error "the underlying connection closed: connection closed unexpectedly"

 [     {         "$id": "1",         "children": [             {                 "$id": "2",                 "children": [],                 "id": 603268262,                 "name": "testfolder",                 "owner": {                     "userid": 555,                     "username": "testuser",                     "firstname": null,                     "lastname": null                 },                 "parent": {                     "$ref": "1"                 },                 "permissions": null,                 "type": 0             }         ],         "id": 1,         "name": "555",         "owner": {             "userid": 555,             "username": "testuser",             "firstname": null,             "lastname": null         },         "parent": null,         "permissions": null,         "type": 0     } ] 

i have tried answers on so question. why error when complex object returned?

you need check data contracts ,take @ : http://msdn.microsoft.com/en-us/library/aa347850.aspx


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -