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 5975389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:04:42+00:00 2026-05-22T21:04:42+00:00

I am trying to do a HttpWebRequest to scrape a login page’s HTML and

  • 0

I am trying to do a HttpWebRequest to scrape a login page’s HTML and post data to that web page’s username and password controls to ‘auto logon’ the client essentially. The problem I am running into, is the URI I am using when parsed has JavaScript within and a XML .config file that is not getting downloaded and only available to the actual hosted site it appears.

When I read the response, execution breakes in VS.NET and I get a “Microsoft JScript Runtime error: ‘VerticalMenuConfig is undefined”

Looking at the script tags where debugging has stopped I see the reference to “scripts/VerticalMenuConfig.xml”.

If I hit continue, the page is all messed up when written to the response of my page, and I still unsuccessfully write to any of the input text boxes. I am using an example like the following that writes to the “Search” text box automatically on Amazon; it is exactly what I need to do: http://www.worldofasp.net/tut/WebRequest/Working_with_HttpWebRequest_and_HttpWebResponse_in_ASPNET_114.aspx

Here is the code that breaks:

<script language="javascript" src="scripts/VerticalMenu.js"></script> 
<script> 
var vm = new VerticalMenu("tdVertMenu", "scripts/VerticalMenuConfig.xml", ""); 
vm.openSubMenu("clientLogin");

It breaks on the line: var vm = new VerticalMenu…

Is there a better way to do this?

  • 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-05-22T21:04:42+00:00Added an answer on May 22, 2026 at 9:04 pm

    It sounds like you have logged your webserver in to your client’s account and are expecting to serve your client with html from that server. That probably won’t work. Security, session tokens that the webserver has and not the user, relative urls in the scraped html (like your problem with the xml).

    You could serve up an auto-submitting form pointed at the other web server – that form would have to contain the user’s credentials in plain text!

    <form id='f' method='post' action='http://otherwebserver/login'>
    <input type='hidden' name='username' value='me' />
    <input type='hidden' name='password' value='my password' />
    // any other fields that the login page expects
    </form>
    <script type='text/javascript'>
      document.getElementById('f').submit();
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to do an scrape a web page but in order to Post
I am trying to use the HTML Agility pack to scrape some data from
I'm trying to POST data to an external url using HttpWebRequest, then i need
I am trying to login to my web app using HttpWebRequest but I keep
I'm trying to scrape the login page of a site I work on and
I'm trying to use instead of usual HttpWebRequest // get a login page HttpWebRequest
I am trying to POST an attachment to CouchDB using the HttpWebRequest. However, when
So i'm trying to POST something to a webserver. System.Net.HttpWebRequest EventReq = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(url); System.String
I am trying to fetch a page using HttpWebRequest , but I am getting
I'm trying to log onto the following website using HttpWebRequest: http://mostanmeldung.moessinger.at/login.php Texts are in

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.