Author: Sharique Khan

Adding Logout Feature in Microsoft Report Manager (SSRS with Forms Authentication)

Once we have configured SSRS to use Custom (Forms) authentication by deploying a custom security extension as described here, we can logon to MS Report Manager (MSRM) using credentials of our custom security framework via a logon web page.

However once you logon you will see that there is no way to logout or to expire the authentication cookie and to do so you need to close the browser. This problem is more pronounced for the “Verification Engineers”  since they have to do so n number of times to test n authentication and authorization scenarios. Also it will be a pain for the end users too since they will surely struggle to find a way to logout.

To fix this we can cook a small hack using jQuery and trusty html/css by manipulating the top right hand breadcrumb of MS Report Manager(MSRM) web pages, which looks like this :


Step1 :

If we carefully inspect the html of MSRM, the name of this breadcrumb is msrs-topBreadcrumb. Using some jQuery we can identify this element and append the logout href at the end of its last child. Once you do this on every page, the pages should look something like below:


<%@ Register TagPrefix=”MSRS” Namespace=”Microsoft.ReportingServices.UI” Assembly=”ReportingServicesWebUserInterface” %>
<%@ Page language=”c#” Codebehind=”CacheRefreshProperties.aspx.cs” Inherits=”Microsoft.ReportingServices.UI.CacheRefreshPropertiesPage” EnableEventValidation=”false” %>


<script type=”text/Javascript”  src=”jquery-1.7.1.min.js” > </script>

<script type=”text/Javascript” >

$(function() {
var a = $(‘.msrs-topBreadcrumb’);
var d = ‘<span style=”margin-left:2px;”>| <a href=”/Reportserver/logon.aspx?Logout=1″>Logout</a> </span>’;





Step 2:

Add the “jquery-1.7.1.min.js” file in  “C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\Pages”

We can download the jQuery file from internet.

Step 3:

Add the code to expire the authentication cookie on the logon.aspx page.

Note : Check the name of authcoooki from web.config which in our case is “sqlAuthCookie”


and that’s it, now the breadcrumb will look like below and clicking on “Logout” will logout the user:


Microsoft Pune User Group April 2012 Meeting

Well, today I attended the Microsoft Pune User Group (PUG) meeting and it was a pleasant experience. Firstly it was good to see the enthusiasm and the participation in the meeting by the fellow Pune developers. Also the speaker also had a grip over the topic.  Actually I attended only one session on Windows 8, as rest others were about SharePoint and somehow I felt uninterested in those. Mostly because I had skipped my breakfast & was simply starving. Coming back to the session on Windows 8, it was delivered by Aviraj Ajgekar and was an introductory session on Windows 8. The speaker was decent & session was informative. It felt like Microsoft is going all out to attract developers for Win 8 app development. All in all it was a good session and i would attempt to attend more of PUG meets.

Be A Better Software Developer : Have a better Office Desk

The quality of your work space / desk talks a lot about who you are. It goes without saying that its wise to invest some money / energy to improve our workspace. I fought for quite a some time with higher ups to get a second monitor. Once that was done, I invested around 5K to get a decent set of ergonomic wireless keyboard & mouse. This has helped to increase productivity  & lifts the mood. Below are some screen grabs of my desk:

Be A Better Software Developer : Get Inspired From The Saints

Be InspiredTo become a better software developers, its of prime importance that we learn from the saints of software development and absorb the great knowledge they emit. These ‘Saints’ continuously acts as teachers and mentors and groom us to be better than what we were yesterday.

Over the course of my career as a Software Developer I have been immensely benefited and influenced by the experiences and thoughts expressed by these very nice people. I would like to immensely thank ‘Jeff Atwood’, ‘Joel Spolsky’, ‘Rands’ (not his real name), ‘Alan Skorkin’, ‘Dan Bergh Johnson’ for thier contributions towards the developer community.

The Knowledge from the “Saints” can be found at these blogs:

1. Coding Horror (Also check out the archives)

2. Joel On Software (Check out the posts in Reading list)

3. Rands In Repose

4. Skorks

5. Ux Design @ SmashingMagazine (good for UX & usability)

6. Letters To A Junior Programmer

7. The Daily WTF