Исключение в ответе Json при отправке в webapi из WP8 - PullRequest
0 голосов
/ 25 сентября 2018

У меня проблема, когда я пытаюсь отправить данные в Web API, что дает исключение HRESULT E_FAIL был возвращен из вызова COM-компонента

System.Net.Browser.ClientHttpWebReqestпри ответеjsontalleydetail будет

[{"_Isedited":true,"_CreatedBy":"tc1","_visitID":"VISIT0001783","_Remark":"","_Syncable":true,"_ID":"VISIT0001783","_ItemName":"Aeroplane (M) Flour 50Kg","_TalleySheetDetailNo":"39.0D39.053000","_TalleySheetHeaderNo":"T2H1.033000","_ItemMasterId":33,"_WareHouseId":2,"_ManufacturedDate":"2018-09-25T00:00:00+05:30","_LoadingTypeId":7,"_LoadingDate":"2018-09-25T16:51:53.7504239+05:30","_ConfirmedHatti":7,"_HattiId":1,"_HattiQty":5,"_HattiWeight":0},{"_Isedited":true,"_CreatedBy":"tc1","_visitID":"VISIT0001783","_Remark":"","_Syncable":true,"_ID":"VISIT0001783","_ItemName":"Aeroplane (M) Flour 50Kg","_TalleySheetDetailNo":"40.0D40.053000","_TalleySheetHeaderNo":"T2H1.033000","_ItemMasterId":33,"_WareHouseId":2,"_ManufacturedDate":"2018-09-25T00:00:00+05:30","_LoadingTypeId":7,"_LoadingDate":"2018-09-25T16:51:53.8672939+05:30","_ConfirmedHatti":7,"_HattiId":2,"_HattiQty":1,"_HattiWeight":0},{"_Isedited":true,"_CreatedBy":"tc1","_visitID":"VISIT0001783","_Remark":"","_Syncable":true,"_ID":"VISIT0001783","_ItemName":"Aeroplane (M) Flour 50Kg","_TalleySheetDetailNo":"41.0D41.054000","_TalleySheetHeaderNo":"T2H1.033000","_ItemMasterId":33,"_WareHouseId":2,"_ManufacturedDate":"2018-09-25T00:00:00+05:30","_LoadingTypeId":7,"_LoadingDate":"2018-09-25T16:51:54.0238698+05:30","_ConfirmedHatti":7,"_HattiId":3,"_HattiQty":2,"_HattiWeight":0},{"_Isedited":true,"_CreatedBy":"tc1","_visitID":"VISIT0001783","_Remark":"","_Syncable":true,"_ID":"VISIT0001783","_ItemName":"Aeroplane (M) Flour 50Kg","_TalleySheetDetailNo":"42.0D42.054000","_TalleySheetHeaderNo":"T2H1.033000","_ItemMasterId":33,"_WareHouseId":2,"_ManufacturedDate":"2018-09-25T00:00:00+05:30","_LoadingTypeId":7,"_LoadingDate":"2018-09-25T16:51:54.1564773+05:30","_ConfirmedHatti":7,"_HattiId":4,"_HattiQty":5,"_HattiWeight":0},{"_Isedited":true,"_CreatedBy":"tc1","_visitID":"VISIT0001783","_Remark":"","_Syncable":true,"_ID":"VISIT0001783","_ItemName":"Aeroplane (M) Flour 50Kg","_TalleySheetDetailNo":"43.0D43.054000","_TalleySheetHeaderNo":"T2H1.033000","_ItemMasterId":33,"_WareHouseId":2,"_ManufacturedDate":"2018-09-25T00:00:00+05:30","_LoadingTypeId":7,"_LoadingDate":"2018-09-25T16:51:54.2542986+05:30","_ConfirmedHatti":7,"_HattiId":5,"_HattiQty":2,"_HattiWeight":0},{"_Isedited":true,"_CreatedBy":"tc1","_visitID":"VISIT0001783","_Remark":"","_Syncable":true,"_ID":"VISIT0001783","_ItemName":"Aeroplane (M) Flour 50Kg","_TalleySheetDetailNo":"44.0D44.054000","_TalleySheetHeaderNo":"T2H1.033000","_ItemMasterId":33,"_WareHouseId":2,"_ManufacturedDate":"2018-09-25T00:00:00+05:30","_LoadingTypeId":7,"_LoadingDate":"2018-09-25T16:51:54.3582527+05:30","_ConfirmedHatti":7,"_HattiId":6,"_HattiQty":1,"_HattiWeight":0},{"_Isedited":true,"_CreatedBy":"tc1","_visitID":"VISIT0001783","_Remark":"","_Syncable":true,"_ID":"VISIT0001783","_ItemName":"Aeroplane (M) Flour 50Kg","_TalleySheetDetailNo":"45.0D45.054000","_TalleySheetHeaderNo":"T2H1.033000","_ItemMasterId":33,"_WareHouseId":2,"_ManufacturedDate":"2018-09-25T00:00:00+05:30","_LoadingTypeId":7,"_LoadingDate":"2018-09-25T16:51:54.4742785+05:30","_ConfirmedHatti":7,"_HattiId":7,"_HattiQty":2,"_HattiWeight":0}]

, а jsontalleyHeader будет

 [{"_Remark":"","_TsStartTime":"2018-09-25T16:51:54.4742785+05:30","_TsEndDatetime":"0001-01-01T00:00:00","_VisitID":"VISIT0001783","_Approxweight":18.0,"_WHId":2,"_TalleySheetHeaderNo":"T2H1.033000","_Isedited":false,"_CreatedBy":null,"_visitID":null,"_Syncable":false,"_ID":null,"_ItemName":null,"_TalleySheetDetailNo":null,"_ItemMasterId":0,"_WareHouseId":0,"_ManufacturedDate":"0001-01-01T00:00:00","_LoadingTypeId":null,"_LoadingDate":"0001-01-01T00:00:00","_ConfirmedHatti":null,"_HattiId":null,"_HattiQty":null,"_HattiWeight":0}]

мой метод веб-API это

 [HttpPost]         
      public HttpResponseMessage InsertTalleydetail([FromBody]List<clsTalleySheetHeader> talleyheaderlist, List<clsTalleySheetDetail>talleydetails)
            {
                return todoService.InsertTalleydetail(talleyheaderlist, talleydetails);
                    //base.BuildSuccessResult(HttpStatusCode.OK, StartTimeDetails);
            }

Я полагаю, это из-за загрузки данных,потому что он отлично работает с 2 до 3 jsontalleydetail.

если кто-то может посоветовать мне по этому поводу, это будет большая помощь.

мне ответили на аналогичный вопросestion /10574688/znachenie-json-ne-prisvaivaetsya-spisku-httppost

...