예제 #1
0
        private IEnumerable <CatalogItem> GetAllReportsFromSsrs()
        {
            using (
                var ssrsClient = new ReportingService2005SoapClient(
                    "ReportingService2005Soap11", _configurationPropertiesProvider.GetProperty(SettingKeyNames.ReportServiceUrl)))
            {
                IEnumerable <CatalogItem> reportsList = null;

                if (ssrsClient != null)
                {
                    ssrsClient.ClientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Delegation;

                    //ssrsClient.ClientCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;

                    //TODO: After migration of app server to rem domain, remqaidentity and remdemoidentity can be added
                    //in SSRS under 'Browser' Role and CredentialCache.DefaultNetworkCredentials can be used without
                    //checking for environment.
                    ssrsClient.ClientCredentials.Windows.ClientCredential = TempClassDuringMigration.NetworkCredential;

                    CatalogItem[] catalogItems;

                    ssrsClient.ListChildren("/" + _configurationPropertiesProvider.GetProperty(SettingKeyNames.ReportsRootUri), true, out catalogItems);

                    reportsList = catalogItems.Where(i => i.Type == ItemTypeEnum.Report);
                }
                return(reportsList);
            }
        }
예제 #2
0
 public void Dispose()
 {
     if (client != null)
     {
         ((IDisposable)client).Dispose();
         client = null;
     }
 }
예제 #3
0
파일: Report.cs 프로젝트: cdcavell/SSRS
        private ReportingService2005SoapClient CreateServiceClient(string reportService2005EndPointUrl)
        {
            BasicHttpsBinding rsBinding = new BasicHttpsBinding();

            rsBinding.Security.Mode = BasicHttpsSecurityMode.Transport;
            rsBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;

            // So we can download reports bigger than 64 KBytes
            // See https://stackoverflow.com/questions/884235/wcf-how-to-increase-message-size-quota
            rsBinding.MaxBufferPoolSize      = 20000000;
            rsBinding.MaxBufferSize          = 20000000;
            rsBinding.MaxReceivedMessageSize = 20000000;

            EndpointAddress rsEndpointAddress       = new EndpointAddress(reportService2005EndPointUrl);
            ReportingService2005SoapClient rsClient = new ReportingService2005SoapClient(rsBinding, rsEndpointAddress);

            // Set user name and password
            rsClient.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;

            return(rsClient);
        }
예제 #4
0
파일: Report.cs 프로젝트: cdcavell/SSRS
 public Report(string reportExecution2005EndPointUrl, string reportService2005EndPointUrl)
 {
     ReportParameters  = new List <ReportExecution.ParameterValue>();
     RSExecutionClient = CreateExecutionClient(reportExecution2005EndPointUrl);
     RSServiceClient   = CreateServiceClient(reportService2005EndPointUrl);
 }
예제 #5
0
 public ReportingServer()
 {
     client = new ReportingService2005SoapClient();
     client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
 }
예제 #6
0
 public ReportingServer()
 {
     client = new ReportingService2005SoapClient();
     client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
 }
예제 #7
0
 public void Dispose()
 {
     if (client != null)
     {
         ((IDisposable)client).Dispose();
         client = null;
     }
 }