Web API生成.rdlc报告,将数据通过槽REST API传递

问题描述

我建立了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;

可以在localhost上运行,但是当我在azure上发布它时,调用相同的api方法会返回错误代码: 值不能为空。 参数名称:内容

我尝试将.rdlc报告“ Building Action”设置为“内容”,但这没有帮助。有什么想法吗?

解决方法

所以问题是天蓝色的计划。不幸的是,生成rdlc文件使用GDI +,并且共享的Azure资源禁用了该选项。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...