473,326 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Need clean code for HttpWebRequest POST

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
Jul 22 '05 #1
1 2795
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"
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Lee | last post by:
Hi, I have a simple web page that allow file to be uploaded, the upload page looks like the following: <form method="post" name="upload" enctype="multipart/form-data"...
1
by: Juan Dent | last post by:
Hi, The Request.SaveAs method stores in a file the complete HTTP request including the HttpVersion. However when I try to reproduce in memory the same thing, I cannot find the "HTTP/1.1"...
3
by: Steve | last post by:
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...
7
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant"...
2
by: Niclas Colleen | last post by:
Hi all, I'm having this problem, the following code is used to request a page where I want to be able to read the response, which is an xml page: string sUrl =...
0
by: sanjaygupta11 | last post by:
I am using httpwebrequest and httpwebresponse objects for sending data to remote appication by post and receiving the response from there. I am using this code in my windows application which will...
0
by: quoclinh | last post by:
I am trying to post an XML string to an ASP page that accept the xml as parameter "request". I did the following code but it seem to cause an exception on the server. I've done xml POST before...
0
by: DiverSteveMO | last post by:
Has anyone got HTTPWebRequest and passing a post to an authenticated site to work on a Intel Dual Core Vista Business machine.? We expect approx. 7Kbytes but afer approx. 3K the code then hangs ...
0
by: SilentCodingOne | last post by:
I'm creating an application that allows the user to create, edit and begin to post ads to Craiglist. I have everything but the begin to post the ad portion complete and cannot seem to get it to work....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.