Question : The permissions granted to user 'ANU\ASPNET' are insufficient for performing this operation. (rsAccessDenied)

I am trying to render a remote report as a pdf file and stream it from my web service. (MS Reporting Services, SQL Server 2005, VB.NET)  I'm getting the error "The permissions granted to user 'ANU\ASPNET' are insufficient for performing this operation. (rsAccessDenied) " on the SetParameters line, never even getting to the point of rendering the report. The ASPNET user is in the Administrators group on my machine, and it also has access to the database underlying the report. The report is published (deployed) to the Report Server and I have no trouble viewing it via the Report Manager. The report itself is supposed to be using a specific set of credentials to login to the database which are specified in the custom datasource in the Report Manager (see attached screenshot).
Any ideas? My code is below.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
Private Function QuotePDF(ByVal intQuoteID As Integer) As MemoryStream
        Dim warnings As Warning() = Nothing
        Dim bytes As Byte()
 
        Try
            Dim rview As New ReportViewer
            rview.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
            rview.ServerReport.ReportServerUrl = New Uri("http://localhost/ReportServer")
            rview.ServerReport.ReportPath = "/Report Bills/QuoteBill"
 
            Dim paramList As New Generic.List(Of ReportParameter)
            paramList.Add(New ReportParameter("QuoteID", intQuoteID.ToString))
            rview.ServerReport.SetParameters(paramList)
 
            bytes = rview.ServerReport.Render("PDF", Nothing, Nothing, Nothing, Nothing, Nothing, warnings)
 
            Dim output As New System.IO.MemoryStream(bytes)
            Return output
 
        Catch ex As Exception
            Throw
        End Try
 
    End Function
Open in New Window Select All

Answer : The permissions granted to user 'ANU\ASPNET' are insufficient for performing this operation. (rsAccessDenied)

In the "Home" screen, go to "Properties" (second tab next to "Content"), and click on "New Role Assignment", and add your user to the "Browser" role.
Random Solutions  
 
programming4us programming4us