第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

ASP.Net Core 2.1 上的 Azure 移動后端連接問題

ASP.Net Core 2.1 上的 Azure 移動后端連接問題

C#
明月笑刀無情 2021-10-24 14:21:54
我正在開發(fā) ASP.Net Core Web 應(yīng)用程序,并嘗試通過 Azure 移動后端連接它。后端與其他 Windows 桌面應(yīng)用程序配合良好。到目前為止,后端使用 ASP.Net Core v2.0 運行良好。昨天我安裝了 ASP.Net Core 2.1 SDK 并將 Microsoft.AspNetCore.All nuget 包從 2.0 更新到 2.1.2,從那時起我收到以下異常:MobileServiceInvalidOperationException - “服務(wù)器沒有提供預(yù)期的響應(yīng)內(nèi)容。”你能告訴我解決這個問題的任何解決方案嗎?
查看完整描述

2 回答

?
呼喚遠(yuǎn)方

TA貢獻(xiàn)1856條經(jīng)驗 獲得超11個贊

我有同樣的問題,但沒有解決方案。我將其追溯到函數(shù)中MobileServiceHttpClient代碼中的以下代碼行SendRequestAsync(...)。


// If there was supposed to be response content and there was not, throw        

if (ensureResponseContent)

{

   long? contentLength = null;


   if (response.Content != null)

   {

      contentLength = response.Content.Headers.ContentLength;

   }


   if (contentLength == null || contentLength <= 0)

   {

        throw new MobileServiceInvalidOperationException("The server did not provide a response with the expected content.", request, response);

   }

}

看著response.Content.Headers.ContentLength它是null。將應(yīng)用程序作為 2.0 Core 項目運行,該值已正確填寫。奇怪的是內(nèi)容在那里。


如果您深入了解私有成員,其中一些已正確設(shè)置。


catch (MobileServiceInvalidOperationException msioe)

{

    //content will contain the correct json but the ContentLenth is null!?!

    string content = await msioe.Response.Content.ReadAsStringAsync();


}

這是一個 2.1 核心問題。希望他們修復(fù)它。


查看完整回答
反對 回復(fù) 2021-10-24
  • 2 回答
  • 0 關(guān)注
  • 175 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號