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

  • Home
  • SEARCH
  • 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 3232682
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:11:22+00:00 2026-05-17T17:11:22+00:00

Hi – Simple question ahead! STATUS : I’ve come this far I’ve implemented a

  • 0

Hi – Simple question ahead!

STATUS:

I’ve come this far I’ve implemented a solution where I get a cookie with a session, but it still doesn’t work. In the sniffer tool, I can see the difference between my application and when using the real website as this:

REAL: ASPSESSIONIDSCRAASDB=EFFBFPEAKOBJGLAPNABPLLCB; passes=15; ChatCannel=1

PROGRAM: ASPSESSIONIDSCRAASDB=KPGBFPEAHNDLENDEOAEELMPJ

The program acts like it’s not logged in, even though I’ve stored the session as a cookie..


I’m trying to create a small program, helping me playing a niche Internet game (just calculations and stuff)..

Anyway – I need to log in! The login system is based on sessions ..

So… I’ve tried this:

string url = "http://server1.online-trucker.dk";

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";

StreamWriter post = new StreamWriter(req.GetRequestStream());
post.Write("Username=MyUsername&Password=MyPassword");
post.Close();

HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
resp.GetResponseStream();
string kage = GetContentFromStream(resp.GetResponseStream()); 

Being a little naive, I expect “kage” should contain the response after clicking the “Log in” button, and my little crawler should have logged in.

The HTML I’m playing with:

       Brugernavn:
   <input type="text" name="Username" size="10" STYLE="font-size: 10px; background-color: #CCCCCC; border: 1px solid #666666;">
   Kode:<input type="password" name="Password" size="10" STYLE="font-size: 10px; background-color: #CCCCCC; border: 1px solid #666666;">
   <input type="submit" name="Logind" value="Logind" STYLE="font-size: 10px; background-color: #CCCCCC; border: 1px solid #666666;"> 

But if you have just a little knowledge about WebRequest, I’m sure you by now will laugh ! 🙂

What I want to do:

  • Put in username/password
  • Click “Log ind”
  • Be able to play in the whole domain of the site, with the now active session

I really hope someone will help!

  • 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-17T17:11:22+00:00Added an answer on May 17, 2026 at 5:11 pm

    A lot of these sites do their best to deter automated logins much like you’re trying to do here. You need to make sure you’re sending the exact data they’re expecting. One way I typically do this is to run a packet sniffer and inspect the HTTP packets that fly back and forth when I’m logging in the normal way. Once I have a baseline to work with it’s just a matter of getting the code to mimic the behaviors.

    A good free packet sniffing app is WireShark. http://www.wireshark.org

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

Sidebar

Related Questions

An extension to my previous question: Text cleaning and replacement: delete \n from a
I'm trying to craft a Java regular expression to split strings of the general
I am generating some text to be shown on a web-site, and use HttpUtility.HtmlEncode
I've got the following login script.. <?php $name = $_POST[name]; $password = $_POST[password]; $query
So to start, I have an array of XML files. These files need to
I am currently running into a problem where an element is coming back from
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I am currently scraping some data from the internet and converting into xml documents.
I have a JSP page retrieving data and when single or double quotes are
Have a webpage that will be viewed by mainly IE users, so CSS3 is

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.