I have a .Net 2.0 app where the user has already provided credentials and been authenticated against a domain, but the user's machine may not be a member of the the domain. The app is using the webbrowser control to display reports from Reporting Services using the following code snippet:
HttpWebResponse response;
WebRequest request = WebRequest.Create(newUri(url));
request.Credentials = theCache;
This works great until the report contains drilldowns. The images (+ and -) for the drilldowns are loaded within the HTML rendered in the stream, and I get an authentication prompt for the images. This is of course the problem. The reason we went this route was to keep the user from having to log in again.
Apparently the webbrowser is not aware of the credentials used in the stream. There doesn't seem to be a way to link the CredentialCache with the webbrowser control. I am at a loss as to how to solve this, any suggestions would be most welcome. TIA,
Dave
HttpWebResponse response;
WebRequest request = WebRequest.Create(newUri(url));
request.Credentials = theCache;
request.PreAuthenticate =
true;response = (
HttpWebResponse)request.GetResponse();webBrowserReportViewer.DocumentStream = response.GetResponseStream();
This works great until the report contains drilldowns. The images (+ and -) for the drilldowns are loaded within the HTML rendered in the stream, and I get an authentication prompt for the images. This is of course the problem. The reason we went this route was to keep the user from having to log in again.
Apparently the webbrowser is not aware of the credentials used in the stream. There doesn't seem to be a way to link the CredentialCache with the webbrowser control. I am at a loss as to how to solve this, any suggestions would be most welcome. TIA,
Dave