B
Beenish Sahar Khan
I am using the following piece of code to post some data to a web form,
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength =formcontents.Length;
sendStream = req.GetRequestStream();
sendStream.Write(formcontents, 0, formcontents.Length);
sendStream.Close();
res = (HttpWebResponse)req.GetResponse();
on last line its continously givng me the following error..
"The remote server returned an error: (500) Internal Server Error."
but the server is my own application, which is working fine, when instead of
giving form contents length i give it hardcoded value it runs fine uptil 7
but after that start giving this error formcontents is a byte[].
Any kind of help will be appreciated.
regards,
Beenish.
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength =formcontents.Length;
sendStream = req.GetRequestStream();
sendStream.Write(formcontents, 0, formcontents.Length);
sendStream.Close();
res = (HttpWebResponse)req.GetResponse();
on last line its continously givng me the following error..
"The remote server returned an error: (500) Internal Server Error."
but the server is my own application, which is working fine, when instead of
giving form contents length i give it hardcoded value it runs fine uptil 7
but after that start giving this error formcontents is a byte[].
Any kind of help will be appreciated.
regards,
Beenish.