The request failed with HTTP status 401: Unauthorized
-
I trying get ssrs 2008 up and running on a new server. I got everything to work just like it dit on my old server and I can deploy reports and view them in the report manager, but I cannot seem to view a report from asp.net applications either in a reportviewer or using the reportexecutionservice. I keep getting the error: The request failed with HTTP status 401: Unauthorized This is the first time that I had to set up ssrs so I do not know whether I have missed something. I tried to make everything the same as the instance on my old server. Any assistance would be appreciated. The following code is what I use for the web execution service and it used to work fine. This code basically just renders the report as a pdf and downloads it. rs.Credentials = New System.Net.NetworkCredential("username", "password", "domainname") Dim reportPath As String = "/OLS/" & ReportName Dim ResultStream() As Byte Dim StreamIdentifiers() As String = Nothing Dim optionalParams(1) As ParameterValue Dim OptionalParam As String = Nothing Dim optionalWarnings As WebReference.Warning() = Nothing optionalParams(0) = New WebReference.ParameterValue optionalParams(0).Name = "WarningID" optionalParams(0).Value = Session("ID") ' Create and set the content type string Dim contentType As String = "application/pdf" Dim historyID As String = Nothing Dim devInfo As String = "False" Dim format As String = "PDF" Dim extension As String = "" Dim encoding As String = "" Dim mimeType As String = "" Dim warnings As Warning() = Nothing Dim streamIDs As String() = Nothing Dim WarningID As String WarningID = Session("ID") Dim execInfo As New ExecutionInfo Dim execHeader As New ExecutionHeader() rs.ExecutionHeaderValue = execHeader execInfo = rs.LoadReport(reportPath, historyID) rs.SetExecutionParameters(optionalParams, "en-us") Dim FilePath As String FilePath = "c:\WebDocuments\OLS\TempDocs\" & Session("EmployeeID") & "\" Try ResultStream = rs.Render(format, devInfo, extension, e
-
I trying get ssrs 2008 up and running on a new server. I got everything to work just like it dit on my old server and I can deploy reports and view them in the report manager, but I cannot seem to view a report from asp.net applications either in a reportviewer or using the reportexecutionservice. I keep getting the error: The request failed with HTTP status 401: Unauthorized This is the first time that I had to set up ssrs so I do not know whether I have missed something. I tried to make everything the same as the instance on my old server. Any assistance would be appreciated. The following code is what I use for the web execution service and it used to work fine. This code basically just renders the report as a pdf and downloads it. rs.Credentials = New System.Net.NetworkCredential("username", "password", "domainname") Dim reportPath As String = "/OLS/" & ReportName Dim ResultStream() As Byte Dim StreamIdentifiers() As String = Nothing Dim optionalParams(1) As ParameterValue Dim OptionalParam As String = Nothing Dim optionalWarnings As WebReference.Warning() = Nothing optionalParams(0) = New WebReference.ParameterValue optionalParams(0).Name = "WarningID" optionalParams(0).Value = Session("ID") ' Create and set the content type string Dim contentType As String = "application/pdf" Dim historyID As String = Nothing Dim devInfo As String = "False" Dim format As String = "PDF" Dim extension As String = "" Dim encoding As String = "" Dim mimeType As String = "" Dim warnings As Warning() = Nothing Dim streamIDs As String() = Nothing Dim WarningID As String WarningID = Session("ID") Dim execInfo As New ExecutionInfo Dim execHeader As New ExecutionHeader() rs.ExecutionHeaderValue = execHeader execInfo = rs.LoadReport(reportPath, historyID) rs.SetExecutionParameters(optionalParams, "en-us") Dim FilePath As String FilePath = "c:\WebDocuments\OLS\TempDocs\" & Session("EmployeeID") & "\" Try ResultStream = rs.Render(format, devInfo, extension, e
Can you please tell me a sample format of username and password. Most probably it will be the issue of authorization. It will be happen when the username and password is correct or the user trying to access have no permission to access that server.Also try to pass username without specify domain.
-
Can you please tell me a sample format of username and password. Most probably it will be the issue of authorization. It will be happen when the username and password is correct or the user trying to access have no permission to access that server.Also try to pass username without specify domain.
Thanks for your response. I am using the system administrator account details and I am not specifying the domain. I use something like this: Username: administrator Password: mylxghs
-
I trying get ssrs 2008 up and running on a new server. I got everything to work just like it dit on my old server and I can deploy reports and view them in the report manager, but I cannot seem to view a report from asp.net applications either in a reportviewer or using the reportexecutionservice. I keep getting the error: The request failed with HTTP status 401: Unauthorized This is the first time that I had to set up ssrs so I do not know whether I have missed something. I tried to make everything the same as the instance on my old server. Any assistance would be appreciated. The following code is what I use for the web execution service and it used to work fine. This code basically just renders the report as a pdf and downloads it. rs.Credentials = New System.Net.NetworkCredential("username", "password", "domainname") Dim reportPath As String = "/OLS/" & ReportName Dim ResultStream() As Byte Dim StreamIdentifiers() As String = Nothing Dim optionalParams(1) As ParameterValue Dim OptionalParam As String = Nothing Dim optionalWarnings As WebReference.Warning() = Nothing optionalParams(0) = New WebReference.ParameterValue optionalParams(0).Name = "WarningID" optionalParams(0).Value = Session("ID") ' Create and set the content type string Dim contentType As String = "application/pdf" Dim historyID As String = Nothing Dim devInfo As String = "False" Dim format As String = "PDF" Dim extension As String = "" Dim encoding As String = "" Dim mimeType As String = "" Dim warnings As Warning() = Nothing Dim streamIDs As String() = Nothing Dim WarningID As String WarningID = Session("ID") Dim execInfo As New ExecutionInfo Dim execHeader As New ExecutionHeader() rs.ExecutionHeaderValue = execHeader execInfo = rs.LoadReport(reportPath, historyID) rs.SetExecutionParameters(optionalParams, "en-us") Dim FilePath As String FilePath = "c:\WebDocuments\OLS\TempDocs\" & Session("EmployeeID") & "\" Try ResultStream = rs.Render(format, devInfo, extension, e
In which line do you get that exception?
-
Thanks for your response. I am using the system administrator account details and I am not specifying the domain. I use something like this: Username: administrator Password: mylxghs
I hope that's not your real administrator password! If it is, you should change it immediately.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer