Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Read Webpage that first requires to put in User/Password

Read Webpage that first requires to put in User/Password

Scheduled Pinned Locked Moved C#
csharp
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paresh_joe
    wrote on last edited by
    #1

    I am writing one simple C# application; which is used to read contents of web page. While reading from the URL which first requires to log in. Is there anyway that i can set user and password, and can read data from this page. Thanks, Perry

    G 1 Reply Last reply
    0
    • P paresh_joe

      I am writing one simple C# application; which is used to read contents of web page. While reading from the URL which first requires to log in. Is there anyway that i can set user and password, and can read data from this page. Thanks, Perry

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Which class are you using to read webpages? If it is HttpWebRequest, then have a look at Credentials property.

      Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

      P 1 Reply Last reply
      0
      • G Giorgi Dalakishvili

        Which class are you using to read webpages? If it is HttpWebRequest, then have a look at Credentials property.

        Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

        P Offline
        P Offline
        paresh_joe
        wrote on last edited by
        #3

        I tried setting Credentials with my user and password :( .. still it reads login page ...

        G 1 Reply Last reply
        0
        • P paresh_joe

          I tried setting Credentials with my user and password :( .. still it reads login page ...

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          I am not sure but try setting PreAuthenticate property to true.

          Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

          P 1 Reply Last reply
          0
          • G Giorgi Dalakishvili

            I am not sure but try setting PreAuthenticate property to true.

            Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

            P Offline
            P Offline
            paresh_joe
            wrote on last edited by
            #5

            No success with this too :( ...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups