[Mono-bugs] [Bug 648862] New: HttpWebRequest fails spectacularly in MonoDroid
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Oct 23 20:18:05 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=648862
https://bugzilla.novell.com/show_bug.cgi?id=648862#c0
Summary: HttpWebRequest fails spectacularly in MonoDroid
Classification: Mono
Product: MonoDroid
Version: unspecified
Platform: 64bit
OS/Version: Windows 7
Status: NEW
Severity: Critical
Priority: P5 - None
Component: Runtime
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: bryancostanich at hotmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Customer
Blocker: Yes
if you try this:
//---- create the web request
HttpWebRequest webRequest = WebRequest.Create("http://google.com") as
HttpWebRequest;
HttpWebResponse response;
StreamReader reader;
string responseText = string.Empty;
//---- try to get the response, always wrap it.
response = webRequest.GetResponse() as HttpWebResponse;
you get this error:
E/mono (16559): [0x54af58:] EXCEPTION handling:
System.Net.Sockets.SocketException: An address incompatible with the requested
protocol was used
E/mono (16559): [0x54af58:] EXCEPTION handling:
System.Net.Sockets.SocketException: No such host is known
E/mono (16559): [0xafe42a98:] EXCEPTION handling: System.Net.WebException:
Error: NameResolutionFailure
E/Mono.Android(16559): System.Net.WebException: Error: NameResolutionFailure
E/Mono.Android(16559): at System.Net.HttpWebRequest.EndGetResponse
(IAsyncResult asyncResult) [0x0005e] in
/home/jon/Development/mono-droid/mono/mcs
/class/System/System.Net/HttpWebRequest.cs:777
E/Mono.Android(16559): at System.Net.HttpWebRequest.GetResponse () [0x0000e]
in /home/jon/Development/mono-droid/mono/mcs/class/System/System.Net/Ht
tpWebRequest.cs:785
E/Mono.Android(16559): at Test_WebRequest.Activity1.<OnCreate>b__0
(System.Object s, System.EventArgs e) [0x00000] in <filename unknown>:0
E/Mono.Android(16559): at
Android.Views.View+OnClickListenerAdapter.n_OnClick_Landroid_view_View_ (IntPtr
jnienv, IntPtr native__this, IntPtr native
_v) [0x00023] in
/home/jpobst/Desktop/mondroid/Mono.Android/src/Android.Views/View.cs:39
D/AndroidRuntime(16559): Shutting down VM
W/dalvikvm(16559): threadid=3: thread exiting with uncaught exception
(group=0x4001b188)
E/AndroidRuntime(16559): Uncaught handler: thread main exiting due to uncaught
exception
E/AndroidRuntime(16559): java.lang.UnsupportedOperationException:
System.Net.WebException: Error: NameResolutionFailure
E/AndroidRuntime(16559): at System.Net.HttpWebRequest.EndGetResponse
(IAsyncResult asyncResult) [0x0005e] in /home/jon/Development/mono-droid/mono/m
cs/class/System/System.Net/HttpWebRequest.cs:777
E/AndroidRuntime(16559): at System.Net.HttpWebRequest.GetResponse ()
[0x0000e] in /home/jon/Development/mono-droid/mono/mcs/class/System/System.Net/
HttpWebRequest.cs:785
E/AndroidRuntime(16559): at Test_WebRequest.Activity1.<OnCreate>b__0
(System.Object s, System.EventArgs e) [0x00000] in <filename unknown>:0
E/AndroidRuntime(16559): at
Android.Views.View+OnClickListenerAdapter.n_OnClick_Landroid_view_View_ (IntPtr
jnienv, IntPtr native__this, IntPtr nati
ve_v) [0x00023] in
/home/jpobst/Desktop/mondroid/Mono.Android/src/Android.Views/View.cs:39
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list