SSRS 2017 Web.config permissions



我的 SSRS 2017 报告管理器遇到了问题。我已经实现了此处找到的示例,除了来自 Web 门户(服务器很好(之外,它似乎都可以正常工作。我发现解决方案是服务用户需要对web.config具有写入权限才能从RSReportingServices.config复制机器密钥。

我怎样才能规避这种情况?我尝试手动写入 web.config,但 rshostingservice 仍然尝试同步密钥并失败。

我希望能够规避写入权限的需要。我通过向运行 ssrs 的服务授予写入权限解决了我的问题。我使用以下代码来授予所需的权限

        try
        {
            var fileSecurity = File.GetAccessControl(Path);
            var user = ServiceUserDetails();
            fileSecurity.AddAccessRule(new FileSystemAccessRule(user, FileSystemRights.Write,
                AccessControlType.Allow));
            fileSecurity.AddAccessRule(new FileSystemAccessRule(user, FileSystemRights.Read,
                AccessControlType.Allow));
            fileSecurity.AddAccessRule(new FileSystemAccessRule(user, FileSystemRights.ReadAndExecute,
                AccessControlType.Allow));
            File.SetAccessControl(Path, fileSecurity);
        }
        catch
        {
            MessageBox.Show(@"Error",
                $@"Unable to set permissions for {Path}. Please ensure service has write permission");
        }

最新更新