Im trying to generate SSRS report and export it to PDF using webservice(asmx) but getting the following error when try to set datasource credentials. Previously I have done it in WebApi and it works fine.
Value does not fall within the expected range. at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.GetSecureMethods() at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.IsSecureMethod(String methodname) at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.SetConnectionSSLForMethod(String methodname) at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod
1 sql16Method, ProxyMethod
1 katmaiMethod, ProxyMethod`1 yukonMethod) at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID) at Microsoft.Reporting.WebForms.SoapReportExecutionService.LoadReport(String report, String historyId) at Microsoft.Reporting.WebForms.ServerReport.EnsureExecutionSession() at Microsoft.Reporting.WebForms.ServerReport.GetDataSources(Boolean& allCredentialsSet) at Microsoft.Reporting.WebForms.ServerReport.GetDataSources() at OtoHRImportServices.Repository.PayslipRepo.CreatePayslip(OtoHREntities db, String conn_string, String report_root_path, PayslipVM model, String password)
List<DataSourceCredentials> dsCredentials = new List<DataSourceCredentials>();
dsCredentials.Add(cred);
ReportViewer1.ServerReport.SetDataSourceCredentials(dsCredentials); <-- throw error