简体   繁体   English

Telerik报告中拒绝访问路径“ C:\\ Windows \\ TEMP \\ ReportService”

[英]Access to the path 'C:\Windows\TEMP\ReportService' is denied in telerik reporting

I have an MVC projects which will display some reports using telerik reporting V8.0.14.255 in local environment every this is working fine, but when I deploy it in hosting environment this error returns Access to the path 'C:\\Windows\\TEMP\\ReportService' is denied. 我有一个MVC项目,每个项目都可以在本地环境中使用Telerik Reporting V8.0.14.255显示一些报告,但每种方法都运行良好,但是当我在托管环境中部署它时,此错误将返回对路径'C:\\ Windows \\ TEMP \\ ReportService”被拒绝。

I tried to change the cache provider, but the same error return all times (I tried memory, Isolated Storage and File) 我尝试更改缓存提供程序,但始终返回相同的错误(我尝试使用内存,隔离存储和文件)

    <section name="Telerik.Reporting"
type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=8.0.14.225, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
 allowLocation="true"
allowDefinition="Everywhere"/>
    ...
    <Telerik.Reporting>
        <Cache provider="IsolatedStorage"/>
        </Telerik.Reporting>

Any suggested solution to fix this issue please 任何解决此问题的建议解决方案

We encountered the same problem, so we used an explicitly designated folder. 我们遇到了同样的问题,因此我们使用了一个明确指定的文件夹。

The FileStorage class has a constructor that accepts a folder path. FileStorage类具有一个接受文件夹路径的构造函数。 We explicitly created this folder on the disk and assigned the necessary permissions to this folder so the accounts that our application was running under could access the folder. 我们在磁盘上显式创建了该文件夹,并为此文件夹分配了必要的权限,以便我们的应用程序在其下运行的帐户可以访问该文件夹。

We then passed this folder path into the constructor. 然后,我们将此文件夹路径传递给构造函数。

public class ReportsController : Telerik.Reporting.Services.WebApi.ReportsControllerBase
{
     public ReportsController()
     {
         var tempFolder =  ConfigurationManager.AppSettings["WebsiteTemporaryFolder]; // We set this in web.config
         this.ReportServiceConfiguration = new Telerik.Reporting.Services.ReportServiceConfiguration
         {
              HostAppId = "TelerikReportsService",
              ReportResolver = new ReportResolver(), // Custom class, not included in this example
              Storage = new Telerik.Reporting.Cache.File.FileStorage(tempFolder)
         };
     }
}

We got confused with exactly which accounts we had to give folder permissions to. 我们对于必须授予文件夹权限的确切帐户感到困惑。 Our website runs under a particular account name ( CmsDemonstration ). 我们的网站以特定的帐户名( CmsDemonstration )运行。 We gave Full Control permissions to the user CmsDemonstration , but it didn't work until we also assigned permissions to the user group IIS_IUSRS . 我们向用户CmsDemonstration授予了完全控制权限,但是直到我们还向用户组IIS_IUSRS分配了权限后,它才起作用。

Have you tried / can you change the permissions for the ReportService folder? 您是否尝试过/可以更改ReportService文件夹的权限? Or the containing folder? 还是包含的文件夹?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM