-1

How can I make my C# app log in to a website that requires username/password authentication? The page uses Apache Struts, if it matters.

user377419
  • 4,681
  • 13
  • 42
  • 56
  • Show us how your C# app is currently trying to connect to that website – Jeff LaFay Sep 14 '10 at 21:32
  • What do you mean? I have no idea how to do this so I don't have any code atm. – user377419 Sep 14 '10 at 21:35
  • We usually do not do your homework or project. – ahmet alp balkan Sep 14 '10 at 21:40
  • I'm in High School. I would love if it had any classes to do with coding but sadly my school is full of rednecks. So no, its not my homework. Why do you assume such? – user377419 Sep 14 '10 at 21:58
  • @user377419, please elaborate on what you are trying to actually accomplish once you login. Do you want to pull down a bunch of data (use HtmlAgilityPack). Do you want to interact with a JS/AJAX heavy website with lots of dynamic content? (use WatiN) Do you want low-level access at the HTTP level so you have complete control? (use HttpWebRequest) – Kirk Woll Sep 14 '10 at 22:37

1 Answers1

1

You need to send data to the web server to simulate a form submission.

There are a few questions that already address this:

Fake a form submission with C# WebClient

How to submit http form using C#

Hopefully now you have a more clear idea of what you are looking for.

Community
  • 1
  • 1
JYelton
  • 35,664
  • 27
  • 132
  • 191