Click here to Skip to main content
16,007,504 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# install wizard ?!! Pin
Kannan Kalyanaraman2-Jul-03 16:10
Kannan Kalyanaraman2-Jul-03 16:10 
GeneralRe: C# install wizard ?!! Pin
Heath Stewart2-Jul-03 18:42
protectorHeath Stewart2-Jul-03 18:42 
GeneralRe: C# install wizard ?!! Pin
Kannan Kalyanaraman2-Jul-03 18:56
Kannan Kalyanaraman2-Jul-03 18:56 
GeneralRe: C# install wizard ?!! Pin
apferreira3-Jul-03 4:06
apferreira3-Jul-03 4:06 
QuestionRemoted Window Forms possible? Pin
lykac2-Jul-03 12:33
lykac2-Jul-03 12:33 
GeneralLabel.Text, strings, & spaces. Pin
aadilm2-Jul-03 11:10
aadilm2-Jul-03 11:10 
GeneralRe: Label.Text, strings, & spaces. Pin
dynamic2-Jul-03 13:38
dynamic2-Jul-03 13:38 
GeneralSending HTTP POST request using System.Net.HttpWebRequest Pin
Le centriste2-Jul-03 10:19
Le centriste2-Jul-03 10:19 
I am trying to send a document (text/plain) to a server (.aspx page). I am always having a time-out (if I specify GET, I get a 404, as I expected).

When I look in the IIS log, I see the following:

2003-07-02 20:17:03 127.0.0.1 - 127.0.0.1 80 POST /Test/WebForm1.aspx - 500 87 -

This appears in the log whether or not the page exists on the server.

The 87 error means "The parameter is incorrect". I suspect that it has something to do with the Content-Length. Here is a code snippet I use to fill the HTTP stream with the document:

protected virtual void FillHttpStream(IDictionary pRequestParams, HttpWebRequest httpRequest)
{
	string httpRequestDocument = (string)pRequestParams["RequestString"];
	StreamWriter httpStreamWriter;

	if ((httpRequestDocument == null) || (httpRequestDocument == String.Empty))
	{
		throw new Exception("No document to send");
	}

	httpRequest.Method = "POST";
	httpRequest.ContentLength = httpRequestDocument.Length;

	httpStreamWriter = new StreamWriter(httpRequest.GetRequestStream());

	httpStreamWriter.Write(httpRequestDocument);
}


I should at least receive the 500 error code, but I time-out.

I could also use a tutorial on programmatically send a document via the HTTP POST method, if anyone know of any.

tx
GeneralSolved Pin
Le centriste2-Jul-03 16:12
Le centriste2-Jul-03 16:12 
GeneralUsing LogonUser function of Advapi32.dll Pin
PSharad2-Jul-03 10:03
PSharad2-Jul-03 10:03 
GeneralRe: Using LogonUser function of Advapi32.dll Pin
rami2k26-May-04 22:55
rami2k26-May-04 22:55 
GeneralRe: Using LogonUser function of Advapi32.dll Pin
Jassim Rahma8-Jul-05 8:30
Jassim Rahma8-Jul-05 8:30 
GeneralRe: Using LogonUser function of Advapi32.dll Pin
rami2k11-Jul-05 23:06
rami2k11-Jul-05 23:06 
GeneralUsing DataGrid with OleDB Pin
Hoang Dung2-Jul-03 9:59
Hoang Dung2-Jul-03 9:59 
GeneralRe: Using DataGrid with OleDB Pin
dynamic2-Jul-03 10:32
dynamic2-Jul-03 10:32 
GeneralRe: Using DataGrid with OleDB Pin
dynamic2-Jul-03 10:33
dynamic2-Jul-03 10:33 
GeneralRe: Using DataGrid with OleDB Pin
dynamic2-Jul-03 10:56
dynamic2-Jul-03 10:56 
GeneralRe: Using DataGrid with OleDB Pin
Khang Nguyen3-Jul-03 4:19
Khang Nguyen3-Jul-03 4:19 
GeneralC# event inheritance Pin
lquest2-Jul-03 8:38
lquest2-Jul-03 8:38 
GeneralRe: C# event inheritance Pin
J. Dunlap2-Jul-03 9:05
J. Dunlap2-Jul-03 9:05 
GeneralProblems with the ComboBox Pin
Torsch2-Jul-03 8:37
Torsch2-Jul-03 8:37 
GeneralRe: Problems with the ComboBox Pin
James T. Johnson2-Jul-03 23:00
James T. Johnson2-Jul-03 23:00 
QuestionCan it really be true? Pin
Marc Clifton2-Jul-03 6:42
mvaMarc Clifton2-Jul-03 6:42 
AnswerRe: Can it really be true? Pin
leppie2-Jul-03 7:09
leppie2-Jul-03 7:09 
GeneralRe: Can it really be true? Pin
Marc Clifton2-Jul-03 7:23
mvaMarc Clifton2-Jul-03 7:23 

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.