locked
Problem using SSRS 2016 webservice RRS feed

  • Question

  • User1366720210 posted

    I am doing some automation with SQL 2016 Reporting Services by accessing its Management web service.

    Here is my code:

     private Policy[] GetItemPolicy(string itemPath = "/", Boolean InheritParent = true)
            {
                ReportingService2010 rs = new ReportingService2010();
                rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
                rs.Url = url;
                try
                {
                    return rs.GetPolicies(itemPath, out InheritParent);
                }
                catch(Exception ex)
                {
                    log(ex.Message);
                }
                return rs.GetPolicies(itemPath, out InheritParent);
            }

    The ex.Message is The request failed with HTTP status 403: Forbidden

    I have added a machine account where it's running to Report Portal. Any idea what the problem might be?

    Both my code (IIS) and SSRS SQL Server are running on the same box.

    While I was developing this solution I was using a distributed architecture where application server and SSRS server were on different machines.

    It worked fine there. Is there any restriction using the same approach on a single machine?

    Thanks

    Tuesday, April 18, 2017 7:32 AM

All replies

  • User-2057865890 posted

    Hi samegoldinButBetter,

    The ex.Message is The request failed with HTTP status 403: Forbidden

    I have added a machine account where it's running to Report Portal. Any idea what the problem might be?

    Both my code (IIS) and SSRS SQL Server are running on the same box.

    While I was developing this solution I was using a distributed architecture where application server and SSRS server were on different machines.

    It worked fine there. Is there any restriction using the same approach on a single machine?

    The 403 error, this is mostly likely caused by the right permissions are not given to the folder. Verify that the process identity credentials used by the IIS application host process are set correctly and that the account has the appropriate permissions. If the account used for the process identity has insufficient permissions then either change the account or grant the account the appropriate permissions.

    reference: https://support.microsoft.com/en-us/help/313075/how-to-configure-web-server-permissions-for-web-content-in-iis

    Best Regards,

    Chris

    Wednesday, April 19, 2017 4:19 AM
  • User1528632139 posted
    what is the solution to the problem you described?
    Friday, June 12, 2020 10:20 PM