Need clean code for HttpWebRequest POST

Discussion in 'ASP General' started by Steve, Jun 17, 2005.

  1. Steve

    Steve Guest

    Hi,

    Could someone post some clean code for a HTTPS POST request running from a
    server to a 3rd party server in an aspx page.
    I have some code that works unreliably. If I try the request from a few web
    pages it will not work reliably.

    I use ThreadPool.QueueUserWorkItem, myHttpWebRequest1.BeginGetRequestStream,
    myHttpWebRequest1.BeginGetResponse.

    Does Microsoft’s .Net SSL socket code use blocking sockets by the way?

    If someone could post a sample with how to start the request with a
    ThreadPool.RegisterWaitForSingleObject etc so the web page does not return
    straight away and some code that can handle many users it would be
    appreciated.

    Regards
    --
    Steve
     
    Steve, Jun 17, 2005
    #1
    1. Advertising

  2. Steve wrote:
    > Hi,
    >
    > Could someone post some clean code for a HTTPS POST request running
    > from a server to a 3rd party server in an aspx page.
    > I have some code that works unreliably. If I try the request from a
    > few web pages it will not work reliably.
    >
    > I use ThreadPool.QueueUserWorkItem,
    > myHttpWebRequest1.BeginGetRequestStream,
    > myHttpWebRequest1.BeginGetResponse.
    >

    There was no way for you to know it, but this is a classic asp newsgroup.
    While you may be lucky enough to find a dotnet-savvy person here who can
    answer your question, you can eliminate the luck factor by posting your
    question to a group where those dotnet-savvy people hang out. I suggest
    microsoft.public.dotnet.framework.aspnet.

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jun 17, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony
    Replies:
    5
    Views:
    5,065
    innosia
    Nov 24, 2009
  2. =?Utf-8?B?U3RldmU=?=

    Need clean code sample for HttpWebRequest

    =?Utf-8?B?U3RldmU=?=, Jun 18, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    7,840
    Joerg Jooss
    Jun 18, 2005
  3. =?Utf-8?B?RGF2ZSBCcm93bg==?=

    HttpWebRequest POST result is not the same as POST via ServerXMLHT

    =?Utf-8?B?RGF2ZSBCcm93bg==?=, Nov 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,143
    Joerg Jooss
    Nov 10, 2005
  4. Replies:
    8
    Views:
    515
  5. JunkFan
    Replies:
    0
    Views:
    502
    JunkFan
    Oct 23, 2008
Loading...

Share This Page