WebViewer not working in deployed application

Posted by: jnissen on 18 January 2023, 4:22 am EST

    • Post Options:
    • Link

    Posted 18 January 2023, 4:22 am EST

    I have a web application where I recently added the WebViewer for report generation in it’s own .aspx file. I followed the directions in the documentation for deploying a web application (https://www.grapecity.com/activereportsnet/docs/latest/online/deploy-web-applications-std.html) but when trying to load a report I am met with a screen that just says “Rendering…” and I see 2 errors in the web browser console. The first error is “Syntax Error” on WebResource.axd and the second is “‘GrapeCity’ is undefined” (see screenshot below). I have a virtual directory set up that points to the base folder for the hosted files and the name of which is being referenced per the documentation in the tag. Is there something that I’m missing?

    This is the aspx page:

    [code]<%@ Page Language=“C#” AutoEventWireup=“true” CodeBehind=“ReportViewer.aspx.cs” Inherits=“ITTask_MVC.Views.Reports.ReportViewer” %>

    <%@ Register assembly=“GrapeCity.ActiveReports.Web” namespace=“GrapeCity.ActiveReports.Web” tagprefix=“ActiveReportsWeb” %>

    [/code] [img]https://gccontent.blob.core.windows.net/discourse-forum-uploads/file-f0b60718-f7b7-4190-9e07-546c287e7903.JPG[/img] [img]https://gccontent.blob.core.windows.net/discourse-forum-uploads/file-5591f960-9509-44d0-aceb-6c691828f2a6.JPG[/img]
  • Posted 22 January 2023, 3:08 am EST

    Hi Joseph,

    I was able to replicate this issue. I am trying to debug it. I will get back to you as soon I have any update on this.

  • Posted 23 January 2023, 12:43 am EST - Updated 23 January 2023, 12:48 am EST

    Hi Joseph,

    I tried to replicate this issue with a sample application. It seems the issue might just be because of the syntax error. As I mentioned before I was able to replicate this issue before as I had a syntax error in the Web Form html script. Once the issue was fixed I was able to successfully deploy the application. I have attached my sample application and the Virtual Directory screenshot for reference.

    For reference, please refer to the attached sample application. If the issue persists please share a sample application replicating the issue or edit the attached sample such that it reproduces the issue and send it back to us so we can replicate the issue at our end and investigate further on this.

    ARWebViewer.zip

  • Posted 25 January 2023, 7:05 am EST

    Thank you for your time and for your response. Do you know what syntax error you corrected in the Web Form HTML script? I’ve gone over what I have and have yet to find a syntax error. I compared my code with your provided sample and I’m not seeing any major differences. I’ll look into making a sample application with the issue replicated.

  • Posted 25 January 2023, 8:18 am EST

    Ok, further update. I tried out deploying your sample project to our test server and I am seeing the same issue. Could this be an issue with my install of ActiveReports or my license? The only thing I changed was updating the virtual directory name in the tag.

  • Posted 29 January 2023, 3:25 pm EST

    Hi Joseph,

    In order to reproduce this issue, please let us know what exact version of ActiveReports are you using and please also share the machine specifications of the deployment machine so we can reproduce this issue at our end and get back to you accordingly.

    If possible then please also share the exact steps you are using to deploy the sample starting from unzipping the file.

    Also, Please try to deploy the previously shared sample application using any other machine to see if the issue persists or not.

  • Posted 30 January 2023, 8:49 am EST

    I just recently upgraded my application to be using version 17.0.0. The machine specifications are as follows:

    Windows Server 2016 Datacenter version 10.0.14393

    IIS 10

    .NET Framework 4.8

    ASP.NET 4.8

    I’m deploying the sample by publishing the project with a FolderProfile into my local filesystem. I then copy those files to the web server into the appropriate folder. I do change the project to update the virtual directory name, but otherwise no other changes to the sample.

    I tried deploying the sample onto another development machine into the default web site in IIS and did not see this issue. Is there an executable I need to run on the server beforehand? The machines I’ve tried this on where it worked already had ActiveReports 17 installed as they are development machines.

  • Posted 30 January 2023, 10:35 pm EST

    Hi Joseph,

    Thanks for the information. I will set up a machine with the same configuration and get back to you on this in a couple of days.

  • Posted 1 February 2023, 8:20 pm EST

    Hi Joseph,

    I tried to replicate the deployment environment at my end and still I wasn’t able to reproduce this issue at my end. Here’s my environment detail:

    • Windows Server 2016 Data Center (OS Build 14393.1884)
    • IIS version 10.0.14393.0
    • .Net Framework 4.8(Runtime)

    To deploy the previously shared sample I made the following changes-

    1. Installed IIS v10 in the deployment machine.
    2. After publishing the sample I removed the following entry from the web.config file:

    <add assembly="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669E0DDF0BB1AA2A"/>


    3. Set the Site Binding to local host port 85.

    4. Added a Virtual Directory Reports and set a physical path for it.

    5. I modified the application permission by adding the following users:

    • IUSR, Permissions: Read & Execute, List folder contents, Read
    • IIS_IUSRS, Permissions: Read & Execute, List folder contents, Read
    1. I also made sure that the virtual directory also had the following users.

    And that’s it! The application was deployed successfully. I noticed that when in the Virtual Directory Users IIS_USRS was not added I received a Type Error in WebResource.axd as reporting/info API failed.

    For reference, I have attached few screenshots of the application, IIS Manager and the Windows Roles and Features. I have also attached the publish folder for you to refer to. Please to publish the attached folder and use the app.publish/bin/Reports as the physical path of the Virtual Directory. If the issue persists then it might be a machine specific issue and I would suggest you to try to publish the application using any other machine.

    Published Folder: https://drive.grapecity.com/download?file=ExternalShare/CE/https--www.grapecity.com-forums-ar-dev-webviewer-not-working-in-deployed-application/app.publish.zip

    Screenshots.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels