Click here to Skip to main content
15,914,642 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: gridView add/delete/update Pin
Abhijit Jana18-Oct-07 5:17
professionalAbhijit Jana18-Oct-07 5:17 
QuestionProblem in fetching values from database. Pin
aspnet2.developer18-Oct-07 4:32
aspnet2.developer18-Oct-07 4:32 
AnswerRe: Problem in fetching values from database. Pin
DigiOz Multimedia18-Oct-07 5:57
DigiOz Multimedia18-Oct-07 5:57 
GeneralRe: Problem in fetching values from database. Pin
aspnet2.developer18-Oct-07 6:47
aspnet2.developer18-Oct-07 6:47 
AnswerRe: Problem in fetching values from database. Pin
Guffa18-Oct-07 7:18
Guffa18-Oct-07 7:18 
Questiondirectly insert into aspnet_Membership Pin
ru_cscoder18-Oct-07 4:31
ru_cscoder18-Oct-07 4:31 
Questioncapturing value of selected value from databasedriven menu Pin
prachishah18-Oct-07 4:21
prachishah18-Oct-07 4:21 
QuestionWEBREQUEST!!! [modified] Pin
kibromg18-Oct-07 3:54
kibromg18-Oct-07 3:54 
Hi all,

I would like to post some data in the form of XML to a ceratin URI.
I have a method like this

HttpPost(URL, xmlOut);

xmlout is a string parameter looks like :-
*********************************
<message_delivery>
<authentication>
<user_name>uname</user_name>
<password>password</password>
</authentication>
<test id="1178028363209" redelivered="false" test="false">
<rb_message>
<recipient id="348">1</recipient>
</rb_message>
<rb_message>
<recipient id="349">2</recipient>
</rb_message>
</message_delivery>
************************************************

In the method i have the following code that generates an error message :

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(URI);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
strNewValue = "XML=" + xmlout;
req.ContentLength = strNewValue.Length;

StreamWriter stOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
stOut.Write(strNewValue);
stOut.Close();

byte[] lbPostBuffer = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(strNewValue);

Stream loPostData = req.GetRequestStream();
loPostData.Write(lbPostBuffer,0,lbPostBuffer.Length);
loPostData.Close();


ERROr : It generates error Message that it can't write on
(loPostData.Write(lbPostBuffer,0,lbPostBuffer.Length);
ERROR :
The request was aborted: The connection was closed unexpectedly.


Please advice

Thanks























-- modified at 11:27 Thursday 18th October, 2007
AnswerRe: WEBREQUEST!!! Pin
Guffa18-Oct-07 7:21
Guffa18-Oct-07 7:21 
GeneralRe: WEBREQUEST!!! Pin
kibromg19-Oct-07 5:46
kibromg19-Oct-07 5:46 
GeneralRe: WEBREQUEST!!! Pin
Guffa19-Oct-07 8:47
Guffa19-Oct-07 8:47 
GeneralRe: WEBREQUEST!!! [modified] Pin
kibromg22-Oct-07 0:42
kibromg22-Oct-07 0:42 
GeneralRe: WEBREQUEST!!! Pin
Guffa22-Oct-07 11:19
Guffa22-Oct-07 11:19 
QuestionMaximum nr Row to add to a DropDownList Pin
Herman<T>.Instance18-Oct-07 3:40
Herman<T>.Instance18-Oct-07 3:40 
AnswerRe: Maximum nr Row to add to a DropDownList Pin
pmarfleet18-Oct-07 4:09
pmarfleet18-Oct-07 4:09 
GeneralRe: Maximum nr Row to add to a DropDownList Pin
Herman<T>.Instance18-Oct-07 4:16
Herman<T>.Instance18-Oct-07 4:16 
GeneralRe: Maximum nr Row to add to a DropDownList Pin
Paddy Boyd18-Oct-07 4:28
Paddy Boyd18-Oct-07 4:28 
QuestionWeb.Config - editor class? Pin
#realJSOP18-Oct-07 3:35
professional#realJSOP18-Oct-07 3:35 
AnswerRe: Web.Config - editor class? Pin
Bjohnson3318-Oct-07 4:07
Bjohnson3318-Oct-07 4:07 
QuestionIncorrect Data appearing in report Pin
macca2418-Oct-07 3:29
macca2418-Oct-07 3:29 
QuestionProblems with TabContainer Pin
Malayil alex18-Oct-07 3:05
Malayil alex18-Oct-07 3:05 
QuestionEmail Issues... Pin
Illegal Operation18-Oct-07 1:58
Illegal Operation18-Oct-07 1:58 
AnswerRe: Email Issues... Pin
pmarfleet18-Oct-07 2:16
pmarfleet18-Oct-07 2:16 
QuestionWeb Service inside Virtual Directory Pin
Taurus205018-Oct-07 1:27
Taurus205018-Oct-07 1:27 
AnswerRe: Web Service inside Virtual Directory Pin
DigiOz Multimedia18-Oct-07 6:01
DigiOz Multimedia18-Oct-07 6:01 

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.