kevinmac Posted August 10, 2003 Posted August 10, 2003 Hi folks, We are creating a .NET ecommerce ap. Part of this ap does credit card transactions to a payment gateway (ours is Bank of America, but it doesn't matter who for the question.) Anyway, we thought we would do it the obvious way by opening the payment gateway's site, doing an HTTP POST transaction, and getting a response in HTTP page that is served in response. Recently we have read that this is a problem however, because .NET does not handle long synchronus calls well. (The call would take like 3 seconds to complete.) We read in the link below that there are similar issues with web service calls. The thread referenced in the link offers a asynchronus call solution, but it seems aimed only at web service use, and we are not sure of the equivalent method for just doing an HTTP POST. My questions for all of you: 1.) Is this a real problem that you are aware of our have experienced (long synchronus calls)? 2.) How do you do it on your site in .NET? Zillions of people must be doing the same thing, I am just looking to see what methods people are using. Thanks in advance for your help. Here is a link describing the problem and solution for web services: http://msdn.microsoft.com/library/?url=/library/en-us/dnservice/html/service07222003.asp And here is another link to a thread describing the problem without a usable solution: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=BZL8a.114907%24Jd.9637%40afrodite.telenet-ops.be&rnum=32&prev=/groups%3Fas_q%3Dperformance%2520resources%2520ASP.NET%26safe%3Dimages%26ie%3DUTF-8%26oe%3DUTF-8%26as_ugroup%3Dmicrosoft.public.*%26lr%3D%26num%3D50%26hl%3Den Kevin Quote
*Gurus* Derek Stone Posted August 11, 2003 *Gurus* Posted August 11, 2003 That article is pretty much the bible of Web service efficiency. It doesn't get much better than the optimizations described therein. However since you're more interested in HTTP posts you'll need to focus on the portion of the article in which the PreRequestHandlerExecute event is implemented. The code in the article can be easily modified to work for a Web request instead of a Web method invocation. The key to optimizing in situations where there are long blocking calls is to remove them from the ASP.NET worker thread onto a background thread that won't halt the chain of execution. PreRequestHandlerExecute is the best way to do just that. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.