Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File not found when connecting to SSRS #176

Closed
felixavendano opened this issue Feb 13, 2024 · 5 comments
Closed

File not found when connecting to SSRS #176

felixavendano opened this issue Feb 13, 2024 · 5 comments

Comments

@felixavendano
Copy link

Hi,

I have this simple code and a report without parameters

The report name is hola.rdl and is in a Report server https://xxx.org/ReportServer/

Like this

Imagen1

This is the code I have

ServerReport report = new ServerReport();
report.ReportServerCredentials.NetworkCredentials = new NetworkCredential("xxx", "xxx", "xxx");
report.ReportServerUrl = new Uri("https://xxxxxxxx.org/ReportServer/");
report.ReportPath = "/Hola";
byte[] pdf = report.Render("PDF");

And when it comes to the last line I get an error The system coudn´t find the specified file, I know what this means, but it seems to be everything correct.

I´m using .net core 6.0

Is there something I´m missing.

Thanks for any support on this

@lkosson
Copy link
Owner

lkosson commented Feb 14, 2024

Your code looks fine. Have you tried running it using original ReportViewer and get same error?

@felixavendano
Copy link
Author

Thanks for your answer. What do you mean with original ReportViewer?

@lkosson
Copy link
Owner

lkosson commented Feb 14, 2024

I mean original package from Microsoft, targeting .NET Framework.

@felixavendano
Copy link
Author

Ah, ok. No, what I did is to access through an iframe and it works fine except that is asking for credentials.
I will try what you suggest.
Thanks a lot.

@felixavendano
Copy link
Author

felixavendano commented Feb 16, 2024

Hi, the problem was that two nugget packages where missing System.ServiceModel.Http and System.ServiceModel.Primitives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants