RS.EXE - Unhandled exception:The request failed with HTTP status: 403

  • Hi, I have SRS installed with SSL. When I run the following rs.exe command rs -i "mydoc.rss" -s "https://localserver/reportserver" -v Agent_ID=1001I get the above error message. I have tried to turn on tracing with no luck. The rss file mydoc.rss is attached - it have one input paramater "Agent_ID" which used by the stored proecdure upon which the report is based. Does anyone have any idea as to what I'm doing wrong any HELP would be much appericated. 
    :sickublic Sub Main()   Dim rs As New ReportingService()  rs.Credentials = System.Net.CredentialCache.DefaultCredentials  Dim format as string = "PDF"  Dim fileName as String = "C:\My.pdf"  Dim reportPath as String = "/MyReportsReports/MyPDF"  ' Prepare Render arguments  Dim historyID as string = Nothing  Dim deviceInfo as string = Nothing  Dim showHide as string = Nothing  Dim results() as Byte  Dim encoding as string  Dim mimeType as string  Dim warnings() AS Warning = Nothing  Dim reportHistoryParameters() As ParameterValue = Nothing  Dim streamIDs() as string = Nothing    ' Report Parameters    Dim parameters(0) As ParameterValue    parameters(0) = New ParameterValue()    parameters(0).Name = "agent_id"    parameters(0).Value = Agent_ID  results = rs.Render(reportPath, format, _   Nothing, Nothing, parameters, _   Nothing, Nothing, encoding, mimeType, _   reportHistoryParameters, warnings, streamIDs)  ' Open a file stream and write out the report  Dim stream  As FileStream = File.OpenWrite(fileName)  stream.Write(results, 0, results.Length)  stream.Close()End Sub
  • Have you tried passing the username and password with the command line call?  It should be picking up your windows credentials, but it's worth a test.

    Steve.

  • Yes i have (with -u and -p optoins on the command line) but still have the same problem.

  • I've now modified my rss scipt to use the domain adminsitrator account ans it work. So it looks like I have problem with my Domain Account under which SRS is running.  The code change I made were

      Dim netCredential = New System.Net.NetworkCredential("Administrator", "ADMINPW", "MYDOMAIN")

      rs.Credentials = netCredential

    and this works.

     

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply