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

C#

 
AnswerRe: if statements with a string? Pin
User 209307311-Jul-05 22:17
User 209307311-Jul-05 22:17 
AnswerRe: if statements with a string? Pin
sayinsinan12-Jul-05 3:42
sayinsinan12-Jul-05 3:42 
GeneralC# DatePicker Pin
epfuller11-Jul-05 15:41
epfuller11-Jul-05 15:41 
GeneralRe: C# DatePicker Pin
Christian Graus11-Jul-05 17:02
protectorChristian Graus11-Jul-05 17:02 
GeneralAdding a scrollbar to a panel Pin
Ruskin Dantra11-Jul-05 12:33
Ruskin Dantra11-Jul-05 12:33 
GeneralRe: Adding a scrollbar to a panel Pin
bneacetp11-Jul-05 14:17
bneacetp11-Jul-05 14:17 
QuestionEvents when Deleting Tree View Nodes? Pin
McClamm11-Jul-05 12:18
McClamm11-Jul-05 12:18 
GeneralUse HttpWebRequest To send POST HTTP request to a web server Pin
surfman1911-Jul-05 11:56
surfman1911-Jul-05 11:56 
hi!
i want to send a POST HTTP Request to a Web Server!

Here i got some information:
http://msdn2.microsoft.com/library/debx8sh9(en-us,vs.80).aspx[^]


my problem is: how can i send such a POST Request, with the JSESSIONID from the GET Response before and the POST Data!?
<br />
POST /webkeeper/Controller HTTP/1.1<br />
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-gsarcade-launch, */*<br />
Referer: https://www.myzone.at/webkeeper/Controller?action=Login&brand=myzone<br />
Accept-Language: de-at<br />
Content-Type: application/x-www-form-urlencoded<br />
Accept-Encoding: gzip, deflate<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)<br />
Host: www.myzone.at<br />
Content-Length: 86<br />
Connection: Keep-Alive<br />
Cache-Control: no-cache<br />
Cookie: JSESSIONID=D4D88DCF401D96D4D1CB05DB051D5FB0<br />
<br />
action=login&login=Anmelden&brand=myzone&username=****&password=****&x=50&y=13<br />


-> the username and password i dont want to show here, thats the reason for the letters: *****


the JSESSIONID i got from a GET HTTP Response:
<br />
HttpWebRequest request1 = (HttpWebRequest)WebRequest.Create("https://www.myzone.at/webkeeper/Controller");<br />
request1.CookieContainer = new CookieContainer();<br />
        <br />
HttpWebResponse response1 = (HttpWebResponse) request1.GetResponse();<br />
response1.Cookies = request1.CookieContainer.GetCookies(request1.RequestUri);<br />
			<br />
Console.WriteLine ("HTTP/" + response1.ProtocolVersion + " " + response1.StatusDescription);<br />
Console.WriteLine (response1.Headers.ToString());<br />
<br />
String sessionid = "Set-Cookie: ";<br />
sessionid += response1.Cookies[0].ToString();<br />


cu+thx
GeneralRe: Use HttpWebRequest To send POST HTTP request to a web server Pin
Guffa11-Jul-05 14:31
Guffa11-Jul-05 14:31 
GeneralRe: Use HttpWebRequest To send POST HTTP request to a web server Pin
surfman1913-Jul-05 6:10
surfman1913-Jul-05 6:10 
QuestionDataGrid cell to span two columns? Pin
TERACytEX11-Jul-05 11:40
TERACytEX11-Jul-05 11:40 
AnswerRe: DataGrid cell to span two columns? Pin
TERACytEX11-Jul-05 14:19
TERACytEX11-Jul-05 14:19 
QuestionHmm. Could this be easyer? Pin
Anthony Mushrow11-Jul-05 10:37
professionalAnthony Mushrow11-Jul-05 10:37 
AnswerRe: Hmm. Could this be easyer? Pin
DavidNohejl11-Jul-05 10:52
DavidNohejl11-Jul-05 10:52 
AnswerOT Pin
DavidNohejl11-Jul-05 10:53
DavidNohejl11-Jul-05 10:53 
GeneralRe: OT Pin
Anthony Mushrow11-Jul-05 11:17
professionalAnthony Mushrow11-Jul-05 11:17 
AnswerRe: Hmm. Could this be easyer? Pin
Guffa11-Jul-05 14:35
Guffa11-Jul-05 14:35 
GeneralAbout that new App.Config Pin
Carl Mercier11-Jul-05 10:30
Carl Mercier11-Jul-05 10:30 
Generalnon-rectangular window and wmp control Pin
Member 150930411-Jul-05 9:33
Member 150930411-Jul-05 9:33 
GeneralPicture in Combo Box Pin
Expert Coming11-Jul-05 9:08
Expert Coming11-Jul-05 9:08 
GeneralRe: Picture in Combo Box Pin
sreejith ss nair11-Jul-05 18:39
sreejith ss nair11-Jul-05 18:39 
QuestionCR, LF, and CRLF? Pin
Lord Kixdemp11-Jul-05 7:50
Lord Kixdemp11-Jul-05 7:50 
AnswerRe: CR, LF, and CRLF? Pin
S. Senthil Kumar11-Jul-05 8:05
S. Senthil Kumar11-Jul-05 8:05 
AnswerRe: CR, LF, and CRLF? Pin
Scott Serl11-Jul-05 8:11
Scott Serl11-Jul-05 8:11 
AnswerRe: CR, LF, and CRLF? Pin
ToddHileHoffer11-Jul-05 8:13
ToddHileHoffer11-Jul-05 8:13 

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.