Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Azure函数中的ReportViewer:mscorlib:路径不是合法形式_C#_Function_Azure_Asp.net Web Api_Azure Functions - Fatal编程技术网

C# Azure函数中的ReportViewer:mscorlib:路径不是合法形式

C# Azure函数中的ReportViewer:mscorlib:路径不是合法形式,c#,function,azure,asp.net-web-api,azure-functions,C#,Function,Azure,Asp.net Web Api,Azure Functions,我第一次将简单的ASP Web API迁移到Azure函数。该函数将接受一些JSON输入,并使用Microsoft.Reporting.WebForms创建PDF报告 不幸的是,我得到了以下错误: 执行函数时出现异常:Functions.HttpTriggerCSharp1。Microsoft.ReportViewer.WebForms:本地报表处理过程中出错。Microsoft.ReportViewer.Common:报表“D:\home\site\wwwroot\HttpTriggerCSh

我第一次将简单的ASP Web API迁移到Azure函数。该函数将接受一些JSON输入,并使用Microsoft.Reporting.WebForms创建PDF报告

不幸的是,我得到了以下错误:

执行函数时出现异常:Functions.HttpTriggerCSharp1。Microsoft.ReportViewer.WebForms:本地报表处理过程中出错。Microsoft.ReportViewer.Common:报表“D:\home\site\wwwroot\HttpTriggerCSharp1\bin\Test.rdlc”的定义无效。Microsoft.ReportViewer.Common:报表处理中发生意外错误。Microsoft.ReportViewer.Common:“Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatVersion”的类型初始值设定项引发异常。mscorlib:路径不是合法形式

首先,我认为找不到.rdlc文件,但事实似乎并非如此。它找到了文件,但似乎无法处理它

我通过以下方式调用该文件:

ReportViewer rv = new ReportViewer();
rv.ProcessingMode = ProcessingMode.Local;
rv.LocalReport.ReportPath = Path.Combine(System.Environment.GetEnvironmentVariable("HOME"), @"site\wwwroot\HttpTriggerCSharp1\bin\Test.rdlc");
我搜索了很多,但找不到Azure函数和ReportViewer的详细信息。也许我错过了什么,或者我在尝试一些不可能的事情。提前感谢。

从中,我们可以知道Microsoft Azure不支持处理模式.Local

Microsoft Azure不支持在本地处理模式下配置的ReportViewer

以下是文档片段,更多详细信息请参阅

要将ReportViewer合并到Microsoft Azure网站中,您需要完成以下任务

  • 将程序集添加到部署包
  • 配置身份验证和授权
  • 将ASP.NET Web应用程序发布到Azure
更新:


根据,目前,此库确实适用于网站和WebJob,但由于加载程序集的性质,它不适用于函数。

请注意,您熟悉ReportViewer,但可能遇到了沙箱问题。请参阅:引用上述站点的内容:支持以下PDF生成器:SQL Reporting framework:要求站点以Basic或更高版本运行。@LingToh Azure功能团队中是否有人可以帮助我?您的功能是在应用程序服务上运行还是在消费计划上运行?它是在应用程序服务上运行的,基本计划。首先,谢谢你的回答。但是,我不确定关于本地处理模式的声明是否是最新的。这是因为我已经在Azure中启动并运行了我的Web API,Azure使用本地处理模式。现在我想把它移植到一个Azure函数。根据,
这个库*可以*处理网站和webjob,但由于加载程序集的性质,它不能处理函数。
嗨,汤姆,我知道,那篇文章也是我写的:)谢谢!如果它被解析为可使其他社区易于搜索,请将其关闭。请投票支持Azure功能: