【发布时间】:2020-12-06 22:09:03
【问题描述】:
我已经构建了 rest API,首先我生成 .rdlc 报告并通过 api GET 方法将其作为字节数组发送。 另一个应用程序调用它并获取字节数组。
我返回这样的字节:
HttpResponseMessage res = new HttpResponseMessage(HttpStatusCode.OK);
res.Content = new ByteArrayContent(file);
res.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream");
return res;
在本地主机上工作,但是当我在 azure 上发布它时,调用相同的 api 方法返回错误代码: 值不能为空。 参数名称:内容
我尝试将 .rdlc 报告“建筑行动”设置为内容,但没有帮助。有什么想法吗?
【问题讨论】: