Endless redirect when deploying SSRS with custom authentication to a production environment
-
Friday, November 30, 2012 11:12 PM
Problem Summary:
We have a custom authentication which we wrote for an SSRS deployment which implements a SSO solution for our website. When deploying to the production environment we are unable to access the SSRS Report Manager because it endlessly redirects to the authentication page.
Installation:
- SQL Server 2008 R2 with SP2 is installed on the pre-release server
- SQL Server Reporting Services is installed on the pre-release server
- Our Web Application is on the pre-release server
Configuration
I had several issues I had to over come while trying to get custom authentication to work on our development environment but I did finally get it to work correctly.
See here for more information about previous errors and how we configured SSO custom authentication for SSRS: Unble to Configure SSRS Custom Authentication Extension with SQL Server 2008 R2
What is different between our development environment and production environment:
Development all on the same server:
- IIS hosting our web application
-
SQL Server 2008 R2 w/ SP2
- DB for our web application
- DB for SSRS
- SSRS Installation
Production environment all on the same server:
- IIS hosting our web application
-
SQL Server 2008 R2 w/ SP2
- DB for SSRS
- SSRS Installation
The following exists on another server for our production environment
-
SQL Server 2008 R2 (note: No SP2 here)
- DB for our web application
Problem:
SSRS is configured to use custom (forms) authentication and is working correctly on our development environment as follows:
- From our website we make service call to ReportingService2010's LogonUser() which, when successful, returns a cookie that will be used by SSRS to manage the session.
- From our website we then redirect the user to the Report Manager
-
At this point the Report Manager will
- See the cookie (this should happen) and allow the user to see the Report Manager site
- See no cookie or an invalid one, and redirect the user to our login page (step #1) (this actually happens)
All Replies
-
Tuesday, December 04, 2012 1:02 AM
-
Tuesday, December 04, 2012 8:12 AMModerator
Hi Steve,
From your description, the issue may occur if the HttpContext.Current.User identity passed to the GetUserInfo() method is null. To resolve the issue, please try the following steps:
1. Modify the <UI> configurations in the RSReportServer.config file as follows:
<UI> <CustomAuthenticationUI> <loginUrl>/Pages/UILogon.aspx</loginUrl> <UseSSL>false</UseSSL> </CustomAuthenticationUI> <ReportServerUrl></ReportServerUrl> <PageCountMode>Estimate</PageCountMode> </UI>Note: Please make sure the back up the config file before making any modifications to it.
2. Make sure the authentication mode is modified in the web.config file of the report manager.
3. To verify whether an identity passed back from GetUserInfo() is null or not, try the following code:
public void GetUserInfo(out IIdentity userIdentity, out IntPtr userId) { //default the userIdentity userIdentity = new GenericIdentity(WindowsIdentity.GetCurrent().Name); // 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) { userIdentity = HttpContext.Current.User.Identity; } // initialize a pointer to the current user id to zero userId = IntPtr.Zero; }Reference:
http://stackoverflow.com/questions/5258259/custom-security-forms-authentication-in-ssrsBesides, you can try to update the SSRS with SQL Server update. Here is a realted thread in the Microsoft Connect:
http://connect.microsoft.com/SQLServer/feedback/details/533197/sql-server-2008-r2-november-ctp-forms-authentication-not-working-in-ssrsHope this helps.
Regards,
Mike YinIf you have any feedback on our support, please click here
Mike Yin
TechNet Community Support- Proposed As Answer by Shahfaisal Muhammed Tuesday, December 04, 2012 2:08 PM
- Marked As Answer by Mike YinMicrosoft Contingent Staff, Moderator Sunday, December 09, 2012 10:09 AM


