Multiple Application Pools using the same Temp File

5 posts, 0 answers
  1. Philipp
    Philipp avatar
    5 posts
    Member since:
    Sep 2016

    Posted 19 Jan 2017 Link to this post

    Hello,

    i have Telerik Reporting Q2 2015 SP1 running in an ASP.NET MVC App. 

    There are 3 different instances of my app running on the same webserver (iis) - therefore i am using 3 different application pools.

    The problem is that all 3 of those application pools are trying to use the same temp files. (eg: C:\Windows\TEMP\ProjectName\9.1.15.731\LCT\value.dat)

    Only one of the application pools has the rights to access this temp file, so the ReportViewer of the other two instances is always giving me the error

    "Error registering the viewer with the service. Access to the path 'C:\Windows\TEMP\ProjectName\9.1.15.731\LCT\value.dat' is denied."

    How can i configure that every application can have it's own temp folder? I think it could be problematic if three apps use the same temp files, or is it possible to configure the access rights, so that every app can use the temp folder?

     

    Thanks, Philipp

  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 19 Jan 2017 Link to this post

    Hi Philipp,

    Please test setting an unique hostAppId for each instance of the Reporting REST Service. The settings must be added in the ReportsControllerBase implementation.

    Depending on the hosting environment, consider changing the cache storage setting as well - REST Service Storage.

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Philipp
    Philipp avatar
    5 posts
    Member since:
    Sep 2016

    Posted 19 Jan 2017 Link to this post

    Thanks for the tip with the unique hostAppIds. It worked!
  4. Dan
    Dan avatar
    2 posts
    Member since:
    Apr 2014

    Posted 18 Sep 2018 in reply to Stef Link to this post


    Please test setting an unique hostAppId for each instance of the Reporting REST Service. The settings must be added in the ReportsControllerBase implementation.

    I would like to try this, but I don't understand where hostAppId is? It doesn't seem to be a property on the ReportsControllerBase. Can you maybe provide a snippet of code showing how to do this?

    Thanks!

  5. Silviya
    Admin
    Silviya avatar
    414 posts

    Posted 21 Sep 2018 Link to this post

    Hi Dan,

    An example of the HostAppId property of the Reporting REST service in the Html5Demo project which is shipped with Telerik Reporting installation: [installation folder]\Progress\Telerik Reporting <VERSION>\Examples\CSharp\Html5Demo:
    public class ReportsController : ReportsControllerBase
    {
        static ReportServiceConfiguration configurationInstance;
     
        static ReportsController()
        {
            var appPath = HttpContext.Current.Server.MapPath("~/");
            var reportsPath = Path.Combine(appPath, @"..\..\..\Report Designer\Examples");
            var resolver = new ReportFileResolver(reportsPath)
                .AddFallbackResolver(new ReportTypeResolver());
     
            configurationInstance = new ReportServiceConfiguration
            {
                HostAppId = "Html5DemoApp",
                Storage = new FileStorage(),
                ReportResolver = resolver,
                // ReportSharingTimeout = 0,
                // ClientSessionTimeout = 15,
            };
        }
     
        public ReportsController()
        {
            this.ReportServiceConfiguration = configurationInstance;
        }
    }

    HostAppId property will set the unique name of the application hosting the Reporting REST service. If you have multiple applications that are implementing the service and will be deployed in the same environment this property needs to be unique for each instance of the service.

    Regards,
    Silviya
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top