Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Unhandled exception

Reply
Thread Tools

Unhandled exception

 
 
Matt
Guest
Posts: n/a
 
      01-09-2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
an unhandled win32 exception was unhandled occurred in inetinfo.exe Warren Tang ASP .Net 1 09-23-2008 03:01 PM
An unhandled exception has been caught by the VSW exception filter. Tedka ASP .Net 2 07-19-2004 08:09 PM
An unhandled exception has been caught by the VSW exception filter. Ola ASP .Net 0 04-26-2004 01:00 PM
Unhandled exception in FileStream when writing to a full disk - bug in framework? Amit ASP .Net 8 08-04-2003 03:34 PM
An unhandled exception occurred during compilation using the CodeDomProvider Pardhasaradhy ASP .Net 1 07-09-2003 05:37 AM



Advertisments