private void checkClientCacheExpired()
        {
            if ((_reportingServiceClient != null) &&
                 (_reportingServiceClient.AuthCookie != null))
            {
                // Check to see if the cached client connection has expired
                if (_reportingServiceClient.AuthCookie.Expired)
                {
                    _reportingServiceClient.Dispose();
                    _reportingServiceClient = null;

                    _configurationCollection.Clear();
                    _configurationCollection = null;
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Gets the SRSUrl used in SRS Web Service.
        /// Inherits the host of the request.
        /// </summary>
        private string GetUrl(string host)
        {
            BOConfigurationCollection configurationCollection = new BOConfigurationCollection();
            configurationCollection.Fill();

            string srsBaseUrl = configurationCollection[Constants.AvailableApplicationSettings.SRSBaseUrl].PropertyValue.TrimEnd(new char[] { '/' });
            string head = srsBaseUrl.Substring(0, srsBaseUrl.Length - srsBaseUrl.Substring(srsBaseUrl.IndexOf("//")).Length);
            srsBaseUrl = srsBaseUrl.Substring(srsBaseUrl.IndexOf("//"));
            string extension = srsBaseUrl.Substring(srsBaseUrl.IndexOf(':'));
            srsBaseUrl = head + "//" + host + extension;

            string srsReportExecutionPage = configurationCollection[Constants.AvailableApplicationSettings.SRSReportExecutionPage].PropertyValue;
            return string.Format("{0}/{1}", srsBaseUrl, srsReportExecutionPage);
        }