Hello i have a problem with SSRS Custom authentication. I followed the instructions here but reporting server get this error:
Authorization ticket not received by LogonUser
I was debugging code and I found out that error is in method ReportServerProxy.GetWebResponse:
protected override WebResponse GetWebResponse(WebRequest request)
{
WebResponse response = base.GetWebResponse(request);
string cookieName = response.Headers["RSAuthenticationHeader"];
// If the response contains an auth header, store the cookie
if (cookieName != null)
{
Utilities.CustomAuthCookieName = cookieName;
HttpWebResponse webResponse = (HttpWebResponse)response;
Cookie authCookie = webResponse.Cookies[cookieName];
// If the auth cookie is null, throw an exception
if (authCookie == null)
{
throw new Exception(
"Authorization ticket not received by LogonUser");
}
// otherwise save it for this request
AuthCookie = authCookie;
// and send it to the client
Utilities.RelayCookieToClient(authCookie);
}
return response;
}
And i call this code in form:
private void InitializeComponent()
{
ReportServerProxy server = new ReportServerProxy();
string reportServer = ConfigurationManager.AppSettings["ReportServer"];
string instanceName = ConfigurationManager.AppSettings["ReportServerInstance"]; //this constants are null
// Get the server URL from the report server using WMI
server.Url = AuthenticationUtilities.GetReportServerUrl("PC065", "MSSQLSERVER");
server.LogonUser("user", "123", null); //throw exception
}
Please help me. I solve this problem for a very long time. My version of SQL Server is:
Microsoft SQL Server 2008 R2 (SP3-OD) (KB3144114) - 10.50.6542.0 (X64) Feb 22 2016 18:07:23 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)
Cookie authCookie = webResponse.Cookies[cookieName];
// If the auth cookie is null, throw an exception
if (authCookie == null)
{
throw new Exception(
"Authorization ticket not received by LogonUser");
}
authCookie is null. Try checking the properties of each cookie.
None
0 Points
3 Posts
SSRS custom authentication - Authorization ticket not received by LogonUser
Jan 02, 2017 12:35 PM|bluray|LINK
Hello i have a problem with SSRS Custom authentication. I followed the instructions here but reporting server get this error:
Authorization ticket not received by LogonUser
I was debugging code and I found out that error is in method ReportServerProxy.GetWebResponse:
And i call this code in form:
This is my configuration
ReportServer\web.config:
ReportServer\rsreportserver.config:
ReportManager\web.config:
Please help me. I solve this problem for a very long time. My version of SQL Server is:
Microsoft SQL Server 2008 R2 (SP3-OD) (KB3144114) - 10.50.6542.0 (X64) Feb 22 2016 18:07:23 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)
None
0 Points
3 Posts
Re: SSRS custom authentication - Authorization ticket not received by LogonUser
Jan 03, 2017 05:12 AM|bluray|LINK
Please, does anyone know what to do about it?
All-Star
17652 Points
3510 Posts
Re: SSRS custom authentication - Authorization ticket not received by LogonUser
Jan 03, 2017 07:43 AM|Chris Zhao|LINK
Hi Bluray,
authCookie is null. Try checking the properties of each cookie.
https://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.cookies(v=vs.110).aspx
Best Regards,
Chris
None
0 Points
3 Posts
Re: SSRS custom authentication - Authorization ticket not received by LogonUser
Jan 03, 2017 11:05 AM|bluray|LINK
Yes, I know that cookie is null. But i dont know why. I dont configure any cookies. In tutorial is no information about cookies. Tutorial is here:
http://www.codeproject.com/Articles/675943/SSRS-Forms-Authentication