P
Phils
Hi guys; hope you can help me
I have built a web app that sits on our web server (asp.net 2.0).
this connects to our SQL server (2005) reporting services database on
dataserver.
Anonymous access must be switched of on IIS (integrated windows only
on).
Once the report has been selected by the user, I query the database to
get the parameters for selected report (loop through parameters
collection). I then check the required parameter controls for the
parameter values. I was using Anonymous access and this was working
fine. But since changing to not allowing Anonymous access I get an
"The request failed with HTTP status 401: Access Denied" error when
using the GetReportParameters method. My code is below
Dim rs As New washington.ReportingService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim report As String = strReportPath & strReportName
Dim forRendering As Boolean = False
Dim historyID As String = Nothing
Dim values As washington.ParameterValue() = Nothing
Dim credentials As washington.DataSourceCredentials() = Nothing
Dim parameters As washington.ReportParameter() = Nothing
parameters = rs.GetReportParameters(report, historyID, forRendering,
values, credentials)
Dim intParamCount As Integer = parameters.Length
Dim intLoopCounter As Integer
Dim parmArray(intParamCount - 1) As ReportParameter
If Not (parameters Is Nothing) Then
Dim rp As washington.ReportParameter
For Each rp In parameters
' loop collection
Next rp
End if
as i understand it i should be passing the credentials to the report
but when call
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
the credentials are empty
am i on the correct path
cheers
p
I have built a web app that sits on our web server (asp.net 2.0).
this connects to our SQL server (2005) reporting services database on
dataserver.
Anonymous access must be switched of on IIS (integrated windows only
on).
Once the report has been selected by the user, I query the database to
get the parameters for selected report (loop through parameters
collection). I then check the required parameter controls for the
parameter values. I was using Anonymous access and this was working
fine. But since changing to not allowing Anonymous access I get an
"The request failed with HTTP status 401: Access Denied" error when
using the GetReportParameters method. My code is below
Dim rs As New washington.ReportingService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim report As String = strReportPath & strReportName
Dim forRendering As Boolean = False
Dim historyID As String = Nothing
Dim values As washington.ParameterValue() = Nothing
Dim credentials As washington.DataSourceCredentials() = Nothing
Dim parameters As washington.ReportParameter() = Nothing
parameters = rs.GetReportParameters(report, historyID, forRendering,
values, credentials)
Dim intParamCount As Integer = parameters.Length
Dim intLoopCounter As Integer
Dim parmArray(intParamCount - 1) As ReportParameter
If Not (parameters Is Nothing) Then
Dim rp As washington.ReportParameter
For Each rp In parameters
' loop collection
Next rp
End if
as i understand it i should be passing the credentials to the report
but when call
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
the credentials are empty
am i on the correct path
cheers
p