troubleshooting Question

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

Avatar of kckeller
kckeller asked on
DB Reporting ToolsVisual Basic.NETMicrosoft SQL Server 2005
5 Comments1 Solution2447 ViewsLast Modified:
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.
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
datasource.doc
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros