Hello,
I'm trying to run Reporting REST service with docker under Linux environment. I'm using the .NET 6. In my separate Report Viewer application, I see the following error:
Unable to get report parameters. An error has occurred. Type: Telerik.Reporting.ReportSerialization.Current.ReportSerializable`1[Telerik.Reporting.Report]
This is a sample code from my Report Viewer application:
import { TelerikReportViewer } from '@progress/telerik-react-report-viewer'
export default function ReportViewer() {
let viewer;
return (
<TelerikReportViewer
ref={ e => viewer = e }
serviceUrl="http://localhost:32788/api/reports/"
reportSource={{
report: 'SampleReport.trdp',
parameters: {}
}}
viewerContainerStyle = {{
position: 'absolute',
left: '5px',
right: '5px',
top: '40px',
bottom: '5px',
overflow: 'hidden',
clear: 'both',
fontFamily: 'ms sans serif'
}}
viewMode="INTERACTIVE"
scaleMode="SPECIFIC"
scale={1.0}
enableAccessibility={false}
/>
)
}
And this is my Dockerfile of the REST Service application:
FROM mcr.microsoft.com/dotnet/aspnet:6.0-jammy-amd64 AS base WORKDIR /app EXPOSE 80 RUN apt-get update \ && apt-get install -y --allow-unauthenticated \ libc6-dev \ libgdiplus \ libx11-dev \ && rm -rf /var/lib/apt/lists/* FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy-amd64 AS build WORKDIR /src RUN dotnet nuget add source https://nuget.telerik.com/v3/index.json -n Telerik -u myemail@ishere.yea -p verysecretpassword --store-password-in-clear-text COPY ["TelerikReportingRestService/TelerikReportingRestService.csproj", "TelerikReportingRestService/"] RUN dotnet restore "TelerikReportingRestService/TelerikReportingRestService.csproj" COPY . . WORKDIR "/src/TelerikReportingRestService" RUN dotnet build "TelerikReportingRestService.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "TelerikReportingRestService.csproj" -c Release -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . COPY "TelerikReportingRestService/Reports" /app/Reports ENTRYPOINT ["dotnet", "TelerikReportingRestService.dll"]
Everything works if I deploy it locally on IIS, however, as soon as I deploy with docker, I'm unable to view reports. I also tried to add runtimeconfig.template.json file to my project root folder with the following:
{
"configProperties": {
"System.Drawing.EnableUnixSupport": true
}
}
Without any luck.
The endpoints such as /api/reports/formats and /api/reports/version works fine even with docker:
[{"name":"PDF","localizedName":"Acrobat (PDF) file"},{"name":"CSV","localizedName":"CSV (comma delimited)"},{"name":"XLSX","localizedName":"Excel Worksheet"},{"name":"PPTX","localizedName":"PowerPoint Presentation"},{"name":"RTF","localizedName":"Rich Text Format"},{"name":"IMAGE","localizedName":"TIFF file"},{"name":"DOCX","localizedName":"Word Document"}]
"17.1.23.718"
Any help is appreciated. Thanks