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