//Generates Cookie to pass to Report Viewer control
        public Cookie getReportViewerCookie(HttpCookie E3cookie)
        {
            //Decrypt E3 Cookie
            FormsAuthenticationTicket E3authTicket = FormsAuthentication.Decrypt(E3cookie.Value);

            //Duplicate cookie and add custom client format (client - username)
            var DupeAuthTicket = new FormsAuthenticationTicket(E3authTicket.Version,
                                                                    string.Concat(UserEnvParms.ClientId, @"-", E3authTicket.Name),
                                                                    E3authTicket.IssueDate,
                                                                    E3authTicket.Expiration,
                                                                    E3authTicket.IsPersistent,
                                                                    UserEnvParms.ClientId,
                                                                    E3authTicket.CookiePath);

            //Logon to report server to get SSRS auth cookie
            ReportServerBL = new ReportingServices(UserEnvParms, FormsAuthentication.Encrypt(DupeAuthTicket));
            
            //Parse Cookie values from SSRS auth string
            setCookiePaths(ReportServerBL.LogonUserToReportingServer());

            //Build cookie for Report Viewer
            if (cookieName != null && cookieValue != null && cookieDomain != null)
            {
                Cookie ReportViewerCookie = new Cookie(cookieName, cookieValue, FormsAuthentication.Decrypt(cookieValue).CookiePath, cookieDomain);
                ReportViewerCookie.HttpOnly = true;
                return ReportViewerCookie;
            }
            else return null; //
        }
        public static SourceControl.ObjectTree GetObjectTree(string Path, ReportingServices.IReportService RS)
        {
            SourceControl.ObjectTree ot = new SourceControl.ObjectTree();

            ot.Name = Path;

            NameValueCollection reports = RS.GetItems(Path);
            foreach (string key in reports)
            {
                ot.Objects.Add(key, reports[key]);
            }

            List<string> folders = RS.GetFolders(Path);
            foreach (string folder in folders)
            {
                if (folder != "Users Folders")
                {
                    //System.Console.WriteLine("Getting ObjectTree For: " + Path + "/" + folder + "...");
                    _logger.Debug("Getting ObjectTree For: " + Path + "/" + folder + "...");
                    ot.ObjectTrees.Add(GetObjectTree(Path + "/" + folder, RS));
                }
                else
                {
                    //System.Console.WriteLine("Not Users Folders, Skipping folder: " + folder);
                    _logger.Debug("Not Users Folders, Skipping folder: " + folder);
                }
            }
            return ot;
        }
Exemplo n.º 3
0
 protected override void BeginProcessing()
 {
     Client = ReportingServices.Create(new ReportingServicesConfiguration
     {
         BusUri         = BusUri,
         BusQueue       = BusQueue,
         BusCredential  = BusCredential.GetNetworkCredentialSafe(),
         RequestTimeout = TimeSpan.FromSeconds(TimeoutSeconds)
     });
 }
Exemplo n.º 4
0
 public ReportController()
 {
     _reportingServices = new ReportingServices();
 }
Exemplo n.º 5
0
 public ExportController()
 {
     clientServices    = new ClientServices();
     exportServices    = new ExportServices();
     reportingServices = new ReportingServices();
 }