Click here to Skip to main content
16,004,452 members
Home / Discussions / C#
   

C#

 
GeneralRe: Serializable socket Pin
Heath Stewart3-Feb-04 5:10
protectorHeath Stewart3-Feb-04 5:10 
GeneralCookies problem... Pin
profoundwhispers2-Feb-04 14:20
profoundwhispers2-Feb-04 14:20 
GeneralRe: Cookies problem... Pin
Heath Stewart3-Feb-04 5:16
protectorHeath Stewart3-Feb-04 5:16 
GeneralRe: Cookies problem... Pin
profoundwhispers3-Feb-04 7:52
profoundwhispers3-Feb-04 7:52 
GeneralRe: Cookies problem... Pin
Heath Stewart3-Feb-04 8:54
protectorHeath Stewart3-Feb-04 8:54 
GeneralRe: Cookies problem... Pin
profoundwhispers3-Feb-04 9:17
profoundwhispers3-Feb-04 9:17 
GeneralRe: Cookies problem... Pin
Heath Stewart3-Feb-04 9:38
protectorHeath Stewart3-Feb-04 9:38 
GeneralRe: Cookies problem... Pin
profoundwhispers3-Feb-04 9:58
profoundwhispers3-Feb-04 9:58 
HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://signin.ebay.com/aw-cgi/eBayISAPI.dll");<br />
req.AllowAutoRedirect = true;<br />
//req.KeepAlive = false;<br />
req.CookieContainer = new CookieContainer();<br />
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";<br />
req.ContentType = "application/x-www-form-urlencoded";<br />
req.Method = "POST";<br />
byte[] PostData = System.Text.Encoding.ASCII.GetBytes("MfcISAPICommand=SignInWelcome&siteid=0&co_partnerId=2&UsingSSL=0&ru=&pp=&pa1=&pa2=&pa3=&i1=-1&pageType=559&userid=booksbysammy&pass=stupiddog&keepMeSignInOption=1");<br />
req.ContentLength = PostData.Length;<br />
Stream tempStream = req.GetRequestStream();<br />
tempStream.Write(PostData, 0, PostData.Length);<br />
tempStream.Close();<br />
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();<br />
Stream strm = resp.GetResponseStream();<br />
StreamReader sr = new StreamReader(strm);<br />
textBox1.Text = sr.ReadToEnd();<br />
strm.Close();<br />
sr.Close();


(By the way, are the last two lines valid, or should I also add strm = null; and sr = null; ?

Heath Stewart wrote:
What exactly is the error message?

Well, it's not really an error message. The point is, after executing the following code, textBox1.Text contains the HTML source of an eBay page the says that my browser has rejected cookies, and there's a "Cookie Error" according to eBay. When I post these settings in Internet Explorer, that's not what I get of course!

By the way, there's one field I'm not adding to post data, which says <input type="submit" value="Sign In >">. As you can see, the submit button does not have a name assigned to it. I don't suppose that's the problem?!

Sammy

"A good friend, is like a good book: the inside is better than the cover..."
GeneralRe: Cookies problem... Pin
Heath Stewart3-Feb-04 10:25
protectorHeath Stewart3-Feb-04 10:25 
GeneralRe: Cookies problem... Pin
profoundwhispers3-Feb-04 10:40
profoundwhispers3-Feb-04 10:40 
GeneralRe: Cookies problem... Pin
profoundwhispers3-Feb-04 10:46
profoundwhispers3-Feb-04 10:46 
GeneralRe: Cookies problem... Pin
Heath Stewart3-Feb-04 10:53
protectorHeath Stewart3-Feb-04 10:53 
GeneralC# exceptions not showing filename/line numbers (PDB issue?) Pin
Arun Bhalla2-Feb-04 13:12
Arun Bhalla2-Feb-04 13:12 
GeneralRe: C# exceptions not showing filename/line numbers (PDB issue?) Pin
Heath Stewart3-Feb-04 5:22
protectorHeath Stewart3-Feb-04 5:22 
GeneralRe: C# exceptions not showing filename/line numbers (PDB issue?) Pin
Arun Bhalla3-Feb-04 7:49
Arun Bhalla3-Feb-04 7:49 
GeneralRe: C# exceptions not showing filename/line numbers (PDB issue?) Pin
Heath Stewart3-Feb-04 8:49
protectorHeath Stewart3-Feb-04 8:49 
GeneralRe: C# exceptions not showing filename/line numbers (PDB issue?) Pin
Arun Bhalla3-Feb-04 10:26
Arun Bhalla3-Feb-04 10:26 
GeneralRe: C# exceptions not showing filename/line numbers (PDB issue?) Pin
Heath Stewart3-Feb-04 10:32
protectorHeath Stewart3-Feb-04 10:32 
GeneralRe: C# exceptions not showing filename/line numbers (PDB issue?) Pin
Arun Bhalla3-Feb-04 11:08
Arun Bhalla3-Feb-04 11:08 
GeneralRe: C# exceptions not showing filename/line numbers (PDB issue?) Pin
Heath Stewart3-Feb-04 11:15
protectorHeath Stewart3-Feb-04 11:15 
GeneralWinForms app displays differently on different computers. Pin
~michL~2-Feb-04 12:47
~michL~2-Feb-04 12:47 
GeneralRe: WinForms app displays differently on different computers. Pin
Heath Stewart3-Feb-04 5:29
protectorHeath Stewart3-Feb-04 5:29 
GeneralRe: WinForms app displays differently on different computers. Pin
~michL~3-Feb-04 13:44
~michL~3-Feb-04 13:44 
GeneralRe: WinForms app displays differently on different computers. Pin
Heath Stewart3-Feb-04 17:54
protectorHeath Stewart3-Feb-04 17:54 
GeneralProgramatically iterating through controls in C# csharp or VB.net Pin
billoo2-Feb-04 11:51
billoo2-Feb-04 11:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.