473,396 Members | 1,864 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,396 software developers and data experts.

Unhandled exception

Hi all,

What is the possible reason that httpWebRequest.GetRequestStream() might
hang there until a timeout exception? Here is the detail:
I'm using PayPal buynow button and IPN for the payment processing. My own
test goes well with following code:
// code snippet
// post form to PayPal https://www.paypal.com/cgi-bin/websrc
// has a hidden "return" url to mydomain/ipn.aspx
//ipn.aspx
....
try {
HttpWebRequest httpWebRequest =
(HttpWebRequest)WebRequest.Create("https://mydomain/test_ipn.aspx");
....
Response.Write("before GetRequestStream"); //displayed
streamWriter = new StreamWriter(httpWebRequest.GetRequestStream());
Response.Write("after GetRequestStream"); //dispalyed
....
}

//test_ipn.aspx
....
<script runat="server" language="c#">
void Page_Init(Object sender, EventArgs e) {
Response.Write("VERIFIED");
Response.End();
return;
}
</script>

But change above "WebRequest.Create("https://mydomain/test_ipn.aspx")"
to
"WebRequest.Create("http(s)://www.paypal.com/cgi-bin/webscr")"
The process would hang there with timeout WebException or my ipn.aspx page
will be shown as below:
Response.Write("before GetRequestStream"); //displayed
streamWriter = new StreamWriter(httpWebRequest.GetRequestStream());
Response.Write("after GetRequestStream"); //NOT dispalyed, timeout

Any clues?
-matt
Nov 18 '05 #1
0 849

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

Similar topics

5
by: Dave Stewart | last post by:
I recently wrote my first Vb.net application, or at least my first complex app since moving up from vb6. When run from the VS.NET IDE, the program shows no errors and runs fine. When the output exe...
5
by: Lucvdv | last post by:
Can someone explain why this code pops up a messagebox saying the ThreadAbortException wasn't handled? The first exception is reported only in the debug pane, as expected. The second (caused by...
5
by: Samuel R. Neff | last post by:
When you have an unhandled exception in vb.net how do you view the exception information in the debugger? In C# the debugger creates a local variable that points to the exception and you can...
0
by: Colmeister | last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions (http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have attempted to incorporate the features he talks...
1
by: Bob | last post by:
In Vs 2005 you have new applicationsEvents.vb I was testing it in a simple app and found that it was easier to implement unhandled exception management tah it was in Vs2003 (vb.net) You can, if you...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.