Some more info..

The same code for a HTTP (not HTTPS) works fine on Mono 1.2.5..

Regards
Andrew


Andrew Tierney wrote:
> Hi All,
>
> I just tested a little VOIP account checker I had running on .NET 2.0 
> and it appears to crash on Mono 1.2.5.
>
> The code snippet in question is as follows: (basically go to the login 
> page, post details then save cookies and reply...)
>
> ================================================================================
>
>             string VOIPPage = 
> "https://billing.sipme.com.au:8445/login.html";;
>             string VOIPPOST = "user=USERID&password=MYPASSWORD&x=27&y=12";
>         
>             HttpWebRequest req = 
> (HttpWebRequest)WebRequest.Create(VOIPPage);
>             req.Method = "POST";
>             req.CookieContainer = new CookieContainer();
>             req.ContentType = "application/x-www-form-urlencoded";
>             req.ContentLength = VOIPPOST.Length;
>             StreamWriter sw = new StreamWriter(req.GetRequestStream());
>             sw.Write(VOIPPOST);
>             sw.Close();   // <<<==== CRASHES HERE..on MONO ??????
>
>             HttpWebResponse postRes = (HttpWebResponse)req.GetResponse();
>             StreamReader sr = new StreamReader(postRes.GetResponseStream());
>             string reply = sr.ReadToEnd();
>
> ======================================================================
>
> The Error when I run this on MONO 1.2.5 is:
>
> Unhandled Exception: System.Net.WebException: Error writing request.
>   at System.Net.WebConnectionStream.WriteRequest () [0x00000]
>   at System.Net.WebConnectionStream.Close () [0x00000]
>   at System.IO.StreamWriter.Dispose (Boolean disposing) [0x00000]
>   at System.IO.StreamWriter.Close () [0x00000]
>   at Voip.Program.Main (System.String[] args) [0x00000]
>
> It works fine on .NET 2.0 on Windows XP Sp2..
>
> Any ideas ??
>
> Regards
> Andrew
>
>
>
>             
>
>
>
> _______________________________________________
> Mono-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-list
>   



_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to