我的應用程序將調用 ahttp trigger來讀取 blob 文件。當文件大小很?。ù蠹s 30MB)時,我能夠收到來自 http 觸發(fā)器的響應。當文件大小約為 160MB 時,我的應用程序收到空響應。僅當 Http 觸發(fā)器部署在 azure 環(huán)境中時才會面臨此問題。當從我的本地計算機運行 http 觸發(fā)器并在我的應用程序中調用本地 http 觸發(fā)器時,它工作正常。呼叫應用程序string WebAddress = "https://MyfunctionApp.azurewebsites.net/api/Report";//string WebAddress = "http://localhost:7071/api/FIComparisonReport";string WebServiceUri = string.Format("{0}?groupcode={1}&domicile={2}&legalstructure={3}", WebAddress, Uri.EscapeDataString(groupCode), Uri.EscapeDataString(domicile), Uri.EscapeDataString(legalStructure));WebRequest request = WebRequest.Create(WebServiceUri);request.Method = "GET";request.Timeout = 360000;WebResponse response = request.GetResponse();var encoding = Encoding.UTF8;string responseText = "";using (var reader = new System.IO.StreamReader(response.GetResponseStream(), encoding)){ responseText = reader.ReadToEnd(); // empty for large files}HTTP觸發(fā)public static async Task<HttpResponseMessage> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequestMessage req, ILogger log) {//read blob to stream MemoryStream resultSets = myfunc(); var response = new HttpResponseMessage(HttpStatusCode.OK) { Content = new ByteArrayContent(resultSets.GetBuffer()) };response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");return response;我在這里缺少什么?
如何從azure http觸發(fā)器接收大量響應
阿波羅的戰(zhàn)車
2023-07-22 18:32:13