Need clean code for HttpWebRequest POST

S

Steve

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
 
B

Bob Barrows [MVP]

Steve said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top