Last post Jun 16, 2011 12:26 AM by mansi_1986
Jan 21, 2011 06:24 AM|mansi_1986|LINK
I have implemented the form authentication extention of SSRS 2008. I can see the logon pages when I type the url for report manager and report server. I can also successfully logon to my report server. But my UILogon page for report manager throws
an exception as given below:
Invalid URI: The format of the URI could not be determined.
I am trying to debug the code but cannot understand where to make changes. Please help me asap. Has anyone implemented form authentication successfully in production server?
Here is the code of my UILogin Form
Private Sub btnLogon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogon.Click
Dim passwordVerified As Boolean = False
Dim redirectUrl As String
If MSSQLRS.FormsSecurity.CheckAuthentication.ValidateString(txtUserName.Text) And _
This line of code below generates exception
Dim server As ReportServerProxy = New ReportServerProxy
server.LogonUser(txtUserName.Text, txtPassword.Text, Nothing)
passwordVerified = True
Catch ex As Exception
lblMessage.Text = "Logon failed"
If passwordVerified = True Then
lblMessage.Text = "Logon successful: User is authenticated"
redirectUrl = Request.QueryString("ReturnUrl")
If Not redirectUrl Is Nothing Then
lblMessage.Text = "Invalid username or password"
lblMessage.Text = "There is an illegal character in the username or password."
' Because the UILogon uses the Web service to connect to the report server
' you need to extend the server proxy to support authentication ticket
' (cookie) management
Public Class ReportServerProxy : Inherits RSWebService.ReportingService2005
Protected Overrides Function GetWebRequest(ByVal uri As Uri) As WebRequest
Dim temp As RSWebService.ReportingService2005
Dim request As HttpWebRequest
Dim cookieJar As CookieContainer = New CookieContainer
Dim localAuthCookie As Cookie
request = HttpWebRequest.Create(uri)
' Create a cookie jar to hold the request cookie
request.CookieContainer = cookieJar
localAuthCookie = AuthCookie
' if the client already has an auth cookie
' place it in the request's cookie container
If Not AuthCookie Is Nothing Then
request.Timeout = -1
Please explain what happens when Dim server As ReportServerProxy = New ReportServerProxy is executed.
Jun 15, 2011 06:55 AM|vishalaj1|LINK
I know, i am a bit late on replying, just incase you need to know. You are not able to get the report server url from WMI.
Not the optimum solution but first step for debugging.
There is a function called GetReportServerUrl in Authorization.cs
Hardcode the return value to your reportserver url + the asmx(this the name of the endpoint)
return @"http://192.168.110.51:80/ReportServer/" + rsAsmx ;
I am still investigating if i can find the permanent solution.
Jun 16, 2011 12:26 AM|mansi_1986|LINK
Thanks a lot. You were definitely late but I have solved my problem just the way you have suggested here. Have successfully implemented form authentication and added a few of my own pages too.