[2005] Webclient authentication
Hi,
I've got an asp.net page which outputs a PDF file using the following line
report.Publish(HttpContext.Current.Response.OutputStream, Siberix.Report.FileFormat.PDF)
I want to connect to the site from a windows forms app, download the pdf and then display it in acrobat.
It would be straightforward I think but the site uses forms authentication with asp.net membership.
Is there anyway I can use the webclient to pass a username and password and then download the file.
Thanks
Re: [2005] Webclient authentication
The WebClient has a Credentials property which allows you to pass authentication information. I'm not sure if it will work in your scenerio or not but here is an example:
Code:
Dim wc As New Net.WebClient
wc.Credentials = New Net.NetworkCredential("user", "password")