C#

Asked • 07/22/19

SSRS authentication in a MVC application?

I have a ASP.NET MVC project which connects to SSRS using `ReportingService2010` web service endpoints to retrieve and download reports. Connection works fine using `CredentialCache.DefaultCredentials` when developing locally with Visual Studio running with admin privileges When published to virtual directory or used with `NetworkCredential` with `domain\\username` it doesn't work as expected. I added the windows system user in SSRS as a system administrator. Current syntax which only works when running locally in Visual Studio with admin privileges. ReportingService2010 service = new ReportingService2010(); service.Credentials = CredentialCache.DefaultCredentials; CatalogItem[] items = service.ListChildren(reportsFolderPath, true); Is there a way to configure `domain\\username` password with `NetworkCredential` ReportingService2010 service = new ReportingService2010(); var credentials = new NetworkCredential("insharp", "abc123", "insharp-lenovo"); service.Credentials = credentials;

1 Expert Answer

By:

Nicholas V. answered • 01/23/24

Tutor
4.9 (52)

Expert C background developer

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.