[Mono-list] Problem with System.Net.HttpWebRequest.GetRequestStream

kobruleht kobruleht2 at hot.ee
Wed Jun 22 15:47:37 EDT 2011


This exception also occurs witohut monodevelop, in mono asp .net mvc2
application 
if calling paypal using code:

HttpWebRequest objRequest = 
(HttpWebRequest)WebRequest.Create("https://api-3t.sandbox.paypal.com/nvp");
objRequest.Timeout =15000;
objRequest.Method = "POST";
objRequest.ContentLength = strPost.Length;
using (StreamWriter myWriter = new 
StreamWriter(objRequest.GetRequestStream()))
                myWriter.Write(strPost);

This causes exception at GetRequestStream() :

System.Net.WebException: The request timed out
  at System.Net.HttpWebRequest.GetRequestStream () [0x0005f] in 
/usr/src/redhat/BUILD/mono-2.10.2/mcs/class/System/System.Net/HttpWebRequest.cs:752
  at NVPAPICaller.HttpCall (System.String NvpRequest) [0x00000] in <filename 
unknown>:0

--------------------------------------------------------------------------------
Version information: Mono Runtime Version: 2.10.2 (tarball Mon Apr 18 
18:57:39 UTC 2011); ASP.NET Version: 2.0.50727.1433

No idea how to fix this. Maybe downgrading to 2.10.1 or older 2.10 version
can help, it worked probably in older 2.10 Mono for me.

--
View this message in context: http://mono.1490590.n4.nabble.com/Problem-with-System-Net-HttpWebRequest-GetRequestStream-tp3518354p3618029.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list