Reportins服务超时过期
我正在开发报告服务,并在执行查询时执行以下操作:
报告处理过程中发生错误。 异常是由调用的目标引发的。 超时过期。 操作完成之前超时的时间或服务器没有响应。
我知道在SQL服务器上运行一两分钟的查询。
我在web.config中设置了连接字符串,如下所示:
“Data Source = servA; Initial Catalog = myPortal; Integrated Security = True; connection timeout = 1000”
它不适合我。
  您可以在连接字符串中指定connection timeout ,但仅表明应等待连接成功的时间, 
  你正在寻找的是command timeout 。  这指定了SSRS等待特定查询成功的时间。  如果我没有记错,您可以在command timeout设置中的每个报告中更改它?  或者,也许它被称为execution timeout ? 
我如何在使用BIDS 2008的过程中实现这一目标:
看到这个链接。
完成Dataset.xsd的设计后,在Dataset.Designer.cs中找到以下代码:
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
        get {
            if ((this._commandCollection == null)) {
                this.InitCommandCollection();
            }
            return this._commandCollection;
        }
    }
并将其更改为:
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection
    {
        get
        {
            if ((this._commandCollection == null))
            {
                this.InitCommandCollection();
                _commandCollection[0].CommandTimeout = 0;
            }
            _commandCollection[0].CommandTimeout = 0;
            return this._commandCollection;
        }
    }
建立你的程序并享受。
链接地址: http://www.djcxy.com/p/56677.html上一篇: Reportins services Timeout expired
下一篇: .NET: SqlDataReader.Close or .Dispose results in Timeout Expired exception
