Quantcast
Channel: Xamarin.Mac — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 1429

Why isn't HTTPClient working?

$
0
0

Hi all,
I'm trying to post to an HTTP URL and I'm getting this error. I'm confused by a few things in there:
1. I don't have a proxy so why is one being set?
2. The same code works on Windows. So why not here?
3. It was working before updating to Visual Studio Update 8.

Thanks so much for your help!

{System.NullReferenceException: Object reference not set to an instance of an object
  at System.Net.ServicePointManager.FindServicePoint (System.Uri address, System.Net.IWebProxy proxy) [0x00115] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/System/System.Net/ServicePointManager.cs:379
  at System.Net.HttpWebRequest.GetServicePoint () [0x00021] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:749
  at System.Net.HttpWebRequest.set_Proxy (System.Net.IWebProxy value) [0x00014] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:614
  at System.Net.Http.HttpClientHandler.CreateWebRequest (System.Net.Http.HttpRequestMessage request) [0x00108] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:274
  at System.Net.Http.HttpClientHandler+<SendAsync>d__63.MoveNext () [0x0003e] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:342
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
  at System.Net.Http.HttpClient+<SendAsyncWorker>d__46.MoveNext () [0x00080] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:276
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/3.4.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/
…


Viewing all articles
Browse latest Browse all 1429

Trending Articles