Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 20764

How to get the exact error message while calling SSRS report using Web Request in C#?

$
0
0

Hello Everyone,

I am exporting the SSRS report using the Web Request in C#. 

Below is the code

WebClient webClient = new WebClient();

NetworkCredential netCredential = new NetworkCredential("Admininstrator", "Administrator");

webClient.Credentials = netCredential;

byte[] reportData = webClient.DownloadData(http://IIS/ReportServer/?Report3/&rs:Format=PDF&rs:Command=Render);
It is working fine. The only problem in the above code is that, whenever any exception occur while dowloading the report, it is not giving the exact error message instead it is showing "The Internal Server(500) error".



Viewing all articles
Browse latest Browse all 20764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>