How do you logout of Report Manager?
Besides closing the browser or clearing the cookie, does Report Manager have a logout button? If not, is there a way to build one?
June 21st, 2008 12:11am

At the present Report Manager does not have a web portal type Login screen with logout button.
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2008 3:01am

Is it possible to use one of the extensions and add a logout button? I have built the custom security extenion for it already. It would be a shame if I had to scrach this entire approach because I can not add a logout button.
June 23rd, 2008 7:28pm

This is from BOL: You can turn off Report Manager if you have a custom application that provides equivalent functionality or if you are using the Report Manager application of a different service instance. Let us know what happens.
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2008 7:59pm

Try this approachhttp://msdn.microsoft.com/en-us/library/reportexecution2005.reportexecutionservice.logoff(SQL.100).aspx
June 23rd, 2008 8:35pm

SQLUSA wrote: This is from BOL: You can turn off Report Manager if you have a custom application that provides equivalent functionality or if you are using the Report Manager application of a different service instance. Let us know what happens. We are currently using the Report Manager with custom security extension. I am hoping I can somehow figure out a way to create a logout button, but so far I've been suggest to build a new web app that uses Reporting Services.One idea i can think of right now is I could create a folder call "Logout" and use soap and grab that folder name and clear the cookie.What do you think?
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2008 9:40pm

I created a folder name Logout for the purpose of logging out. Under my security extension I successfully capture when the user clicks on the "Logout" Folder.How do I logout in Authorization.CheckAccess?I tried code below, but error out. Code Snippet HttpContext.Current.Session.RemoveAll(); HttpContext.Current.User = null; HttpContext.Current.Response.Cookies.Clear(); HttpContext.Current.Response.Clear(); FormsAuthentication.SignOut(); HttpContext.Current.Response.Redirect("./Logout.aspx", false);
June 24th, 2008 3:01am

docchang wrote: One idea i can think of right now is I could create a folder call "Logout" and use soap and grab that folder name and clear the cookie. You should give your workaround plan a try. Let us know what happens.
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2008 3:02am

Hope all is well!A logout feature is requested by the customer. My approach is to create a "Logout" folder in the home folder so that when the user clicks on it, i'll clear cookies and clear authentication session. I grab the item name and insert into cache Code Snippet public string GetItemName() { XmlDocument SOAPDocument = getWebServiceRequest(); XmlNamespaceManager ns = getNamespaceManager(SOAPDocument); XmlNode result = SOAPDocument.SelectSingleNode("//def:Item", ns); if (result == null) { return null; } String ItemPath = result.InnerText; string[] ItemDescription = ItemPath.Split(new char[] { '/' }); HttpContext.Current.Cache.Insert("ItemName", ItemDescription[ItemDescription.Length - 1], null, DateTime.Now.AddMinutes(5), TimeSpan.Zero); return ItemDescription[ItemDescription.Length - 1]; } In my authorization if I found "Logout" folder I will run the function below Code Snippet public void Logout() { HttpContext.Current.Response.Cookies.Clear(); HttpContext.Current.Response.Clear(); FormsAuthentication.SignOut(); } I double check in the GetUserInfo and make sure it will return NULL if Cache["ItemName"] == "Logout" Code Snippet public void GetUserInfo(out IIdentity userIdentity, out IntPtr userId) { // If the current user identity is not null, // set the userIdentity parameter to that of the current user if (HttpContext.Current != null && HttpContext.Current.User != null) { if (HttpContext.Current.Cache != null && HttpContext.Current.Cache["ItemName"] != null && (0 == String.Compare(HttpContext.Current.Cache["ItemName"].ToString(), "Logout", true))) { HttpContext.Current.Response.Cookies.Clear(); HttpContext.Current.Response.Clear(); FormsAuthentication.SignOut(); userIdentity = null; } else userIdentity = HttpContext.Current.User.Identity; } else { userIdentity = null; } // initialize a pointer to the current user id to zero userId = IntPtr.Zero; } Right now when I clicks on the Logout folder the Report Server just error out. Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message: -- <html> <head> <title> SQL Server Reporting Services </title><meta name="Generator" content="Microsoft SQL Server Reporting Services 9.00.3054.00" /> <meta name="HTTP Status" content="500" /> <meta name="ProductLocaleID" content="9" /> <meta name="CountryLocaleID" content="1033" /> <meta name="StackTrace" content /> <style> BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black} H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt} LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline} .ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray} A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR3366CC; TEXT-DECORATION:none} A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLORFF3300; TEXT-DECORATION:underline} A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR3366CC; TEXT-DECORATION:none} A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; colorFF3300; TEXT-DECORATION:underline} </style> </head><body bgcolor="white"> <h1> Reporting Services Error<hr width="100%" size="1" color="silver" /> </h1><ul> <li>An internal error occurred on the report server. See the error log for more details. (rsInternalError) <a href="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsInternalError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.00.3054.00" target="_blank">Get Online Help</a></li><ul> <li>Object reference not set to an instance of an object.</li> </ul> </ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span> </body> </html> --. Any suggestions?
June 24th, 2008 10:51pm

I found that the correct way to clear the cookie and created a Logout.aspx page. Code Snippet protected void Page_Load(object sender, EventArgs e) { HttpCookie sqlAuthCookie = new HttpCookie("sqlAuthCookie", "sqlAuthCookie"); sqlAuthCookie.Expires = DateTime.Now.AddDays(-1); HttpContext.Current.Response.Cookies.Add(sqlAuthCookie); } I also added the html code into Folder.aspx & Report.aspx Code Snippet <html><body> <div><a href="http://<reportserver>/Logout.aspx">Logout</a></div></body></html>Woola!
Free Windows Admin Tool Kit Click here and download it now
June 26th, 2008 10:25pm

Do you have the full code for logout.aspx that you could share?
January 14th, 2009 11:17pm

Here is the most updated version.I've created a master page like this.<%@MasterLanguage="C#"AutoEventWireup="true"CodeBehind="ReportServer.master.cs"Inherits="Microsoft.Samples.ReportingServices.CustomSecurity.ReportServer"%><div><ahref="UILogon.aspx?Logout=1">Logout</a></div>In UILogon.aspx.cs to capture the Logout.privatevoidPage_Load(objectsender,System.EventArgse){//PutusercodetoinitializethepageherelblMessage.Text="Welcome!";if(!Page.IsPostBack){if(Request.QueryString["Logout"]!=null){HttpCookiesqlAuthCookie=newHttpCookie("sqlAuthCookie");sqlAuthCookie.Expires=DateTime.Now.AddDays(-1);HttpContext.Current.Response.Cookies.Add(sqlAuthCookie);lblMessage.Text="Youhavesuccessfullyloggedout.";}}}Woola! Give credit for those who guided you to the right direction by clicking "Mark As Answer"
Free Windows Admin Tool Kit Click here and download it now
March 3rd, 2009 10:56pm

Hi docchang, can you explain a bit more clear how to implement this, I create a Logout.aspx file, with the page_load code on it, an copy it on the reports folder, on the page/folder.aspx I add the <div> <a href="http://<reportserver>/Logout.aspx">Logout</a></div> </body> But nothing happend. What am I missing? or what is wrong? thanks in advance.Visitando a los Jedis
September 6th, 2011 3:39pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics