Click here to Skip to main content
15,917,645 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: A Problem with TextBox control in ASP.NET Pin
enjoycrack24-Apr-07 18:02
enjoycrack24-Apr-07 18:02 
AnswerRe: A Problem with TextBox control in ASP.NET Pin
Sandeep Akhare24-Apr-07 20:00
Sandeep Akhare24-Apr-07 20:00 
QuestionDeclare Variables globally Pin
BINOVAR24-Apr-07 14:24
BINOVAR24-Apr-07 14:24 
AnswerRe: Declare Variables globally Pin
Arun.Immanuel24-Apr-07 16:25
Arun.Immanuel24-Apr-07 16:25 
AnswerRe: Declare Variables globally Pin
Tirthadip24-Apr-07 18:38
Tirthadip24-Apr-07 18:38 
Questionhyperlinks Pin
hahii24-Apr-07 12:22
hahii24-Apr-07 12:22 
AnswerRe: hyperlinks Pin
Quinten.Miller24-Apr-07 13:08
Quinten.Miller24-Apr-07 13:08 
QuestionHttpWebRequest Hanging on Post GetResponse() Pin
Tristan Rhodes24-Apr-07 12:02
Tristan Rhodes24-Apr-07 12:02 
Hi guys,

I'm working on a little app to post stuff over the 'interweb'. I have Get and Head working fine, but when i try and do a POST, i write the data, and then do a Request.GetResponse(), and it just hangs.

I'm pretty sure i have everything, so i'm slightly baffled as to why it's not working. Hope someone can give me some some pointers. Code attatched.

<br />
    public HttpWebResponse Post()<br />
    {<br />
      if (postData == null)<br />
        throw new NullReferenceException("No PostData has been assigned.");<br />
<br />
      // Declaration<br />
      HttpWebRequest req;<br />
      Stream memory;<br />
      Stream reqStream;<br />
<br />
      //Create Post Request<br />
      req = (HttpWebRequest)HttpWebRequest.Create(FullUrl);<br />
      req.Method = "POST";<br />
<br />
      // Create Memory Stream and Write Data<br />
      memory = new MemoryStream();<br />
      postData.WriteData(memory);<br />
<br />
      // Setup Request<br />
      req.ContentLength = memory.Length;<br />
      req.ContentType = "application/x-www-form-urlencoded"; //TODO: Update with postData.Type<br />
<br />
      // Get Request Stream and Write Data<br />
      reqStream = req.GetRequestStream();<br />
      StreamUtils.CopyStream(memory, reqStream);<br />
<br />
      // Return Response<br />
      return (HttpWebResponse)req.GetResponse(); //<-- Hangs Here Indefinitely<br />
    }<br />


Cheers

Tris

-------------------------------

Carrier Bags - 21st Century Tumbleweed.

QuestionCustomising the asp:CreateUserWizard Control Pin
Brendan Vogt24-Apr-07 9:46
Brendan Vogt24-Apr-07 9:46 
QuestionBack & Forward Button in browser Pin
aransiola24-Apr-07 7:48
aransiola24-Apr-07 7:48 
AnswerRe: Back & Forward Button in browser Pin
Quinten.Miller24-Apr-07 13:12
Quinten.Miller24-Apr-07 13:12 
QuestionDisplaying table contents Pin
krk101124-Apr-07 7:40
krk101124-Apr-07 7:40 
QuestionDisplay a .snp file on a ASP.NET page Pin
Ibuprofen24-Apr-07 7:40
Ibuprofen24-Apr-07 7:40 
QuestionGrab value of input control via Page.FindControls - issue Pin
DeepToot24-Apr-07 5:09
DeepToot24-Apr-07 5:09 
AnswerRe: Grab value of input control via Page.FindControls - issue Pin
badgrs24-Apr-07 5:57
badgrs24-Apr-07 5:57 
GeneralRe: Grab value of input control via Page.FindControls - issue Pin
DeepToot24-Apr-07 6:59
DeepToot24-Apr-07 6:59 
Questionwindow.confirm Pin
Imran Khan Pathan24-Apr-07 4:05
Imran Khan Pathan24-Apr-07 4:05 
AnswerRe: window.confirm Pin
Arun.Immanuel24-Apr-07 4:15
Arun.Immanuel24-Apr-07 4:15 
GeneralRe: window.confirm Pin
Sujit Gupta24-Apr-07 7:51
Sujit Gupta24-Apr-07 7:51 
AnswerRe: window.confirm Pin
badgrs24-Apr-07 5:51
badgrs24-Apr-07 5:51 
QuestionPlz find out error in my code. Pin
Care Career24-Apr-07 2:27
Care Career24-Apr-07 2:27 
AnswerRe: Plz find out error in my code. Pin
Colin Angus Mackay24-Apr-07 2:32
Colin Angus Mackay24-Apr-07 2:32 
AnswerRe: Plz find out error in my code. Pin
Russell Jones24-Apr-07 2:42
Russell Jones24-Apr-07 2:42 
AnswerRe: Plz find out error in my code. Pin
Md. Ismail24-Apr-07 2:50
Md. Ismail24-Apr-07 2:50 
AnswerRe: Plz find out error in my code. Pin
Dave Sexton24-Apr-07 3:16
Dave Sexton24-Apr-07 3:16 

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.