Last post Mar 04, 2009 04:08 AM by sul125
Mar 03, 2009 09:42 AM|sul125|LINK
Well I am trying to log in to a form authentication page.
ok i successfuly loged in and it work.
Now the problem is i can not send the second request to that page to click on a link in logged in page.
Do i need to create another reuqest for it or can i use the old one?
here is the error i get:
Cannot send a content-body with this verb-type.
here is my code.
myreq.CookieContainer = cookie;
// Send the login information to server
datastream.Write(bytearray, 0, bytearray.Length);
// Send the order to click a button on logged in page
datastream1.Write(bytearray1, 0, bytearray1.Length);
Mar 03, 2009 10:25 AM|Evan Freeman|LINK
I'm confused by what your trying to do here. Are you trying to postback to the login page and force a redirect?
If so you should just do a Server.Transfer.
Also your comment "send login information to the server"
Your already at the server so what are you trying to do here exactly?
Mar 04, 2009 04:08 AM|sul125|LINK
let me put it that way. I want to log in to a web site using my windows form app. then click on a button after loging in.
here is the code for loging in.
and it work i can log in and it redirect me to members.aspx page. but now how to click on a button on that members page names button3?