We had a web forms applications deployed in IIS with SSRS reports in a different servers .We used to give full permissions In report server for the system where our code was deployed and things were working fine. Now we are re writing the same code to client WPF applications ,since code is downloaded to individual client PC ,we are get an error "the permissions granted for this User is not enough" .So now do I have to give each individual user who is using WPF application access in reporting server? Is there any way to impersonate an id ?or any better solution to this problem?
Asked
Active
Viewed 52 times
0
-
You may impersonate an user using the Win32 native `LogonUser` API and the `WindowsIdentity.RunImpersonated` method as explained [here](https://stackoverflow.com/questions/125341/how-do-you-do-impersonation-in-net). – mm8 Sep 24 '20 at 14:56
1 Answers
0
Give 1 user access in SSRS for the folders of datasource,datsets and the reports folder . Then in c# where you interact with the report at the starting of the function use these two lines and then do all your other functionality related to reports .
NetworkCredential reportCredentials = new NetworkCredential("username", "password", "domain");
rptReportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = reportCredentials;

krishna
- 241
- 1
- 5
- 18