This is a migrated thread and some comments may be shown as answers.

Multiple Application Pools using the same Temp File

6 Answers 229 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Philipp
Top achievements
Rank 1
Philipp asked on 19 Jan 2017, 01:55 PM

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

6 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 19 Jan 2017, 02:17 PM
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
0
Philipp
Top achievements
Rank 1
answered on 19 Jan 2017, 03:00 PM
Thanks for the tip with the unique hostAppIds. It worked!
0
Dan
Top achievements
Rank 1
answered on 18 Sep 2018, 04:57 PM

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

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!

0
Silviya
Telerik team
answered on 21 Sep 2018, 08:58 AM
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
0
Ron
Top achievements
Rank 1
Iron
Iron
answered on 30 Jul 2020, 02:00 PM

Good morning.

I'm running into the same issue of having the same project published multiple times to the same server (ie. live, test, etc.) and I'm using the Telerik.Reporting.Service.AspNetCore 14.0.20.219 NuGet package.

With the current version, particularly working from the standalone Report package, there's not a lot to the controller (it just passes an interface to an instance of the base class). I'm trying the following and it doesn't seem to be achieving the desired result. Let me know if I need to do this differently:

 

    public ReportsController(IReportServiceConfiguration reportServiceConfiguration)
        : base(reportServiceConfiguration)
    {
      reportServiceConfiguration.HostAppId = MyGlobalConstantService.GetHostAppIdString();
    }

 

0
Katia
Telerik team
answered on 04 Aug 2020, 07:00 AM

Hi Ron,

Access to the path 'xxx\value.dat' is denied." error might indicate that the application IIS User doesn't have sufficient permissions to use the specified folder - see the KB article Error registering the viewer with the service. Access to path X is denied.

We strongly advise using database storage for production environments - see IStorage implementation suitable for deploying in Web Farms. If you prefer FileStorage, you need to provide a path that is fully accessible by the application user. You can use the FileStorage(String) constructor for the purpose as suggested in How to implement the ReportsController in an application article.

 

Regards,
Katia
Progress Telerik

Tags
General Discussions
Asked by
Philipp
Top achievements
Rank 1
Answers by
Stef
Telerik team
Philipp
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Silviya
Telerik team
Ron
Top achievements
Rank 1
Iron
Iron
Katia
Telerik team
Share this question
or