Last post Nov 15, 2013 04:09 AM by Samson sun - MFST
Nov 13, 2013 11:33 AM|mc.munda|LINK
I am trying to test LogonUser() for my report viewer web application. When i try to connect I encountered this error:
The request failed with HTTP status 401: Unauthorized
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim rs As New localhost_reportingService.ReportingService2010
Dim UserName As String = TextBox1.Text
Dim pass As String = TextBox2.Text
Dim myauthortity As String = Nothing
rs.LogonUser(UserName, pass, myauthortity)
Label4.Text = "Authentication Successful"
Catch ex As Exception
Label5.Text = "Error in Authentication"
Label3.Text = ex.Message.ToString
Currently I am trying in local machine but not able to connect / validate with
Please guide me if my approach is correct to check and what changes i need to in :-
a) config file
b) or any other places i am missing :(
Nov 15, 2013 04:09 AM|Samson sun - MFST|LINK
Generally, the 401 error occurs when the user is not authorized to the Report Server. Besides, if the Reporting Services is configured to use Kerberos, however, we didn't register Service Principal Name (SPN) for the account the Reporting Services is running
under, this error will occur as well.
To resolve the issue, you can simply configure the data source to use stored credentials. If you have Kerberos enabled, you can also address the issue by registering SPN for the report server service. For the detailed information, please see:
If you have any more questions, please feel free to ask.