Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

How to login programmatically

My company bought a web app, say, it's in http://mysite. All code has been compiled to .dll file (all pages we see are generated by .dll), so you can't customize it in any way.

Once, you're logged in the following uri will give you a pdf document.
http://mysite.com/wincgi/file.dll?reportloc=...param=...bla

Now I need to grab the content of that pdf doc and save it. I know how to use HttpWebRequest. But I'm not logged in that uri will give me the content of "login error" page. So, how would I login programmatically first before accessing that pdf doc uri?
[602 byte] By [alphaoide] at [2007-11-11 8:01:50]
# 1 Re: How to login programmatically
http://geekswithblogs.net/dtotzke/articles/24571.aspx
Phil Weber at 2007-11-11 23:13:30 >
# 2 Re: How to login programmatically
You just nailed it. Thanks a bunch.
alphaoide at 2007-11-11 23:14:30 >