Web Report Designer works locally but not on the live server

1 Answer 208 Views
.NET Framework Report Designer - Web
Arthur
Top achievements
Rank 1
Veteran
Iron
Arthur asked on 16 Sep 2022, 04:12 PM

We're facing an issue that we can't quite solve. We have integrated the Web Report Designer into our ASP.NET Framework 4.8 project and it's work a treat when running it on my machine under IIS. We tried to publish it onto our live server, but we get an error code 500.

The ASPX page:

<%@ Page Language="c#" CodeBehind="TelerikReportDesigner.aspx.cs" AutoEventWireup="True" Inherits="Traxs.ASPX.TelerikReportDesigner" %>
<!DOCTYPE html>
<html>
    <head>
        <title>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">

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://kendo.cdn.telerik.com/2022.3.913/js/kendo.all.min.js"></script>
        <script src="../api/reportdesigner/resources/js/telerikReportViewer"></script>
        <script src="../api/reportdesigner/designerresources/js/webReportDesigner"></script>
    </head>
    <body>
	<div id="webReportDesigner">Loading...</div>

	<script type="text/javascript">
            $(function () {
                $("#webReportDesigner").telerik_WebReportDesigner({
                    persistSession: false,
                    toolboxArea: {
                        layout: "list"
                    },
                    serviceUrl: "../api/reportdesigner"
                });
            });
    </script>
    </body>
</html>

 

The controller:


[Route("api/reportdesigner")]
public class ReportDesignerController : ReportDesignerControllerBase
{
    static ReportServiceConfiguration _configurationInstance;
    static ReportDesignerServiceConfiguration _designerConfigurationInstance;

    static ReportDesignerController()
    {
        var path = Path.Combine(HttpContext.Current.Server.MapPath("~"), "TelerikReportDesigner/Reports");

        var resolver = new UriReportSourceResolver(path)
            .AddFallbackResolver(new TypeReportSourceResolver());

        _configurationInstance = new ReportServiceConfiguration
        {
            HostAppId = "Html5App",
            Storage = new FileStorage(),
            ReportSourceResolver = resolver,
            ReportSharingTimeout = 0,
            ClientSessionTimeout = 20
        };

        string sessionId = HttpContext.Current.Request["ASP.NET_SessionId"];

        _designerConfigurationInstance = new ReportDesignerServiceConfiguration
        {
            DefinitionStorage = new DatabaseDefinitionStorage(path, sessionId),
            ResourceStorage = new DatabaseResourceStorage(),
            SettingsStorage = new DatabaseSettingsStorage()
        };
    }

    public ReportDesignerController()
    {
        this.ReportServiceConfiguration = _configurationInstance;
        this.ReportDesignerServiceConfiguration = _designerConfigurationInstance;
    }
}

 

The log generated by Fiddler Jam.

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Arthur
Top achievements
Rank 1
Veteran
Iron
answered on 19 Sep 2022, 08:48 AM
I found the issue, some logic threw an exception in DatabaseSettingsStorage, which was instantiated in the ReportDesignerController constructor.
Tags
.NET Framework Report Designer - Web
Asked by
Arthur
Top achievements
Rank 1
Veteran
Iron
Answers by
Arthur
Top achievements
Rank 1
Veteran
Iron
Share this question
or