Acess denied error in SQL Reporting

Discussion in 'Databases' started by DaveBanker, Sep 3, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am having trouble rendering a report in vb code. I can write the report and view it in visual Studio. I can use the web report page to view the reports but when i try to render the report into a PDF format, I get

    The request failed with HTTP status 401: Access Denied

    I have read the knowledge base info and can get it to work when using SQL Server and Reporting services on my development machine but when i try to use the SQL and Reporting Servers at DiscountAsp I get the error. I have tried all kinds of different usernames, domains, report path names, impersonation,etc but of no avail.

    Here is my code. it fails onrs.render.




    Dim rs As New SQLReporting.ReportingService


    Dim parms(0) As SQLReporting.ParameterValue


    Dim parmsout As SQLReporting.ParameterValue()


    parms(0) = New SQLReporting.ParameterValue


    parms(0).Label = "JobNbr"


    parms(0).Name = "JobNbr"


    parms(0).Value = Job.JobNumber.ToString


    Dim Warnings As SQLReporting.Warning()


    Dim Encoding As String


    Dim mimetype As String


    Dim streamids As String()


    Dim filename As String


    filename = Session.SessionID & "_rpt.pdf"


    Dim Cred As System.Net.NetworkCredential


    Cred = New System.Net.NetworkCredential("xxxx", "xxxx", "") ' username and password given to me by DiscountAsp when I signed up for SQL reporting. I use the same userid and password when using the web interface.





    rs.Credentials = Cred


    'Dim Rpt() As Byte = rs.Render("/systemsinfo/reports/ilds", "PDF", _


    Nothing, Nothing, parms, Nothing, Nothing, Encoding, mimetype, parmsout, Warnings, streamids)


    Dim stream As System.IO.FileStream = System.IO.File.Create(Request.PhysicalApplicationPath & filename, Rpt.Length)


    stream.Write(Rpt, 0, Rpt.Length)


    stream.Close()





    Can anyonehelp?


    Dave
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    what is the URL your proxy class is pointing to?

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. I forgot there was a URL in the proxy class, I created it so long ago.

    I was thinking that the deployment properties of the report project was the reference. I changed the proxy URL and all seems to be working -

    thanks so much.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page