2

我在使用报表服务器时遇到问题。打开报告管理器 URL 需要很长时间。因此,报表服务器上会出现超时问题。

自动启动 Report Manager URL 的最佳方式是什么?

我最初的想法是使用 PowerShell 脚本和每周自动运行该脚本的任务计划程序。

但是,我找不到可以做到这一点的 PowerShell 脚本。有任何想法吗?

4

1 回答 1

0

尝试更改 asp.net 项目的 web.config

<system.web>
 <sessionState mode="InProc" cookieless="false" timeout="9999"/>
</system.web>

这可能有助于代替 powershell 脚本,并且还实现一个处理程序脚本,该脚本可以
使用 jquery每 5 秒调用一次

public class SesstionHandler : IHttpHandler,IRequiresSessionState {

    public void ProcessRequest (HttpContext context) {
        context.Session["KeepSessionAlive"] = DateTime.Now;
    }

    public bool IsReusable {
        get {
            return false;
        }
    }

}

并在页面级别添加此 jquery

$(function () {
    setInterval(KeepSessionAlive, 60000);
});

var i = 0;
function KeepSessionAlive() {
    i = i + 1;
    $.post( "SesstionHandler.ashx" , null, function () {
        .. some code here if needed
    });
}
于 2016-07-04T07:26:26.693 回答