Reputation: 41
I have a report server URL - http://server_name/ReportServer/ReportService2010.asmx
I am trying to access the service using a C# console app
My console app code, with a service reference called ReportsService to the reports server, code is here -
static void Main(string[] args)
{
ReportsService.ReportingService2010SoapClient proxy = new ReportsService.ReportingService2010SoapClient();
proxy.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
proxy.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
//proxy.ClientCredentials = "";
try
{
ReportsService.Schedule[] schedule;
ReportsService.TrustedUserHeader trustedHeader = new ReportsService.TrustedUserHeader();
string siteURL = null;
proxy.ListSchedules(trustedHeader, siteURL, out schedule);
}
catch (Exception e)
{
throw;
}
}
}
I get this error message on executing proxy.ListSchedules() -
{"The permissions granted to user 'DOMAIN\user.name' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'DOMAIN\user.name' are insufficient for performing this operation."}
App.config file is -
<bindings>
<basicHttpBinding>
<binding name="ReportingService2010Soap">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://server_name:80/ReportServer/ReportService2010.asmx"
binding="basicHttpBinding" bindingConfiguration="ReportingService2010Soap"
contract="ReportsService.ReportingService2010Soap" name="ReportingService2010Soap" />
</client>
Please let me know how to get around this error.
Upvotes: 1
Views: 1655
Reputation: 41
I resolved it by giving myself a Role of "System User" in "Site Settings".
Upvotes: 2