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.
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.
I made your changes above and now everything is working fine after deploying to IIS.
Thank you very much and have a nice day!