Web Report Designer MVC not working when deployed on IIS

0 Answers 457 Views
.NET 5 Report Designer - Web
Puiu
Top achievements
Rank 1
Puiu asked on 30 Aug 2021, 09:23 AM | edited on 30 Aug 2021, 09:25 AM

Hello everyone,

I have a problem with my Web Report Designer project. On my local machine everything works fine but  when i deploy it on the IIS serve, I receive this error:

 http://localhost/reportdesigner/resources/js/telerikReportViewer/ net::ERR_ABORTED 500 (Internal Server Error)
WebReportDesigner:40 GET http://localhost/reportdesigner/designerresources/js/webReportDesigner/ net::ERR_ABORTED 500 (Internal Server Error)
WebReportDesigner:39 GET http://localhost/reportdesigner/resources/js/telerikReportViewer/ net::ERR_ABORTED 500 (Internal Server Error)
WebReportDesigner:40 GET http://localhost/reportdesigner/designerresources/js/webReportDesigner/ net::ERR_ABORTED 500 (Internal Server Error)
WebReportDesigner:44 Uncaught TypeError: $(...).telerik_WebReportDesigner is not a function
    at HTMLDocument.<anonymous> (WebReportDesigner:44)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at Function.ready (jquery.min.js:2)
    at HTMLDocument.K (jquery.min.js:2)
(anonymous) @ WebReportDesigner:44
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
K @ jquery.min.js:2

 

This is my Index.cshtml

<head>
    <title>Web Report Designer</title>

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link href="https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap" rel="stylesheet">

</head>
<body>

    <div id="webReportDesigner">
        loading...
    </div>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2020.3.1118/js/kendo.all.min.js"></script>

    <script src="/api/reportdesigner/resources/js/telerikReportViewer/"></script>
    <script src="/api/reportdesigner/designerresources/js/webReportDesigner/"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $("#webReportDesigner").telerik_WebReportDesigner({
                toolboxArea: {
                    layout: "list"
                },
                serviceUrl: "/api/reportdesigner",
                report: "20201130 Partner Commissions.trdp"
            }).data("telerik_WebDesigner");
        });
    </script>

</body>

 

This is my controller :

{
    [Route("api/reportdesigner")]
    public class ReportDesignerController : ReportDesignerControllerBase
    {
        public ReportDesignerController(IReportDesignerServiceConfiguration reportDesignerServiceConfiguration, IReportServiceConfiguration reportServiceConfiguration)
            : base(reportDesignerServiceConfiguration, reportServiceConfiguration)
        {
        }
    }
}

 

I would appreciate if anyone could help me. Thanks and have a nice day!

I forgot to mention, I am a beginner with Telerik reporting and everything related to it.


Neli
Telerik team
commented on 02 Sep 2021, 08:06 AM

Hi Puiu,

I am sorry to hear that you are experiencing issues with our product. Please, make sure that all files and resources are hosted successfully.

For one of our customers making the following changes fixed the issue:

<script src="@Url.Content("~/api/reportdesigner/resources/js/telerikReportViewer")"></script>
<script src="@Url.Content("~/api/reportdesigner/designerresources/js/webReportDesigner")"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $("#webReportDesigner").telerik_WebReportDesigner({
            persistSession: false,
            toolboxArea: {
                layout: "list"
            },
            serviceUrl: "@Url.Content("~/api/reportdesigner/")",
. . .
        }).data("telerik_WebDesigner");
    });
</script>

If this doesn't work, can you please  install the Fiddler Jam extension then generate a log and share it with us? In this way, we will get more details about the failing request.

Larry
Top achievements
Rank 1
commented on 03 Sep 2021, 08:01 AM

Hello dear Neli,

I made your changes above and now everything is working fine after deploying to IIS.

Thank you very much and have a nice day!

No answers yet. Maybe you can help?

Tags
.NET 5 Report Designer - Web
Asked by
Puiu
Top achievements
Rank 1
Share this question
or