Results 1 to 2 of 2

Thread: [2005] Webclient authentication

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    180

    [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

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    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")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width