views:

126

answers:

1

What is the correct way to supply WindowsCredentials to the ReportViewer control in order to authenticate to a Report Server?

When browsing to the reports a popup will ask for credentials, but i'm not able to provide the credentials in code? Have tried numerous sollutions on the web, but nothing seems to fit?

A: 

Found it eventually!

reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = new NetworkCredential("user", "password");
Jan de Jager
This doesn't work for web forms - IReportServerCredentials only specifies a getter for the NetworkCreditials property.-dave
David Gardiner
I'm pretty sure my problem was related to the webControl? it was some time ago will check it for you.
Jan de Jager