Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9208915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:43:14+00:00 2026-06-18T00:43:14+00:00

I have a webpage which is windows forms authenticated ,and i want to download

  • 0

I have a webpage which is windows forms authenticated ,and i want to download a copy of this page’s HTML in to my server, when user request this page. I have tried something like this

using (WebClient client = new WebClient())
        {
            string htmlCode = client.DownloadString("http://aksphases:200/lynliste.aspx");  
        }

which doesn’t gives me correct result because of the URL I had passes to system creates new session.And in that case i need to authenticate this web-request,which I can’t do.Only way to authenticate this webpage is that user log in manually(I know ways to authenticate werequests by code,but I can’t try that here for some special reasons). Is there any other way for me to download current page’s HTML which is running in in browser with out authenticating the URL.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:43:15+00:00Added an answer on June 18, 2026 at 12:43 am

    You could send the current forms authentication cookie along with the request:

    using (WebClient client = new WebClient())
    {
        client.Headers[HttpRequestHeader.Cookie] = 
            System.Web.HttpContext.Current.Request.Headers["Cookie"];
        string htmlCode = client.DownloadString("http://aksphases:200/lynliste.aspx");  
    }
    

    This way we are basically transferring the current HTTP request cookies to the remote HTTP call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a webpage with a form, which looks kinda like this: @using (Html.BeginForm(MyAction,
I have an webpage which posts some data and then redirects to a page
I have content on a webpage which is both sent from the server at
I have a web page on which I have a form. This form contains
I have a txt file which actually is a html source of some webpage.
I have a C# Windows Forms app that launches a webpage based on some
I have a class which inherits System.Windows.Forms.Form. I need to make the form available
I have a working webpage which just displays external html files inside a div
I have an instance of System.Windows.Forms.CheckedListBox which displays a list of tick boxes and
I have an element in a window in a web page, which I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.