Skip to content

Instantly share code, notes, and snippets.

@mauricio
Created February 28, 2012 13:29
Show Gist options
  • Save mauricio/1932564 to your computer and use it in GitHub Desktop.
Save mauricio/1932564 to your computer and use it in GitHub Desktop.
Unhandled Exception: Microsoft.Http.HttpStageProcessingException: Cannot cast from source type to destination type. ---> System.InvalidCastException: Cannot cast from source type to destination type.
at Microsoft.Http.HttpWebRequestTransportStage+HttpTransportAsyncResult.CreateAndPrepareWebRequest (Microsoft.Http.HttpTransportAsyncResult self) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpWebRequestTransportStage+HttpTransportAsyncResult..ctor (Boolean preferSync, Microsoft.Http.HttpRequestMessage request, Microsoft.Http.HttpWebRequestTransportSettings settings, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpWebRequestTransportStage.ProcessRequestAndTryGetResponse (Microsoft.Http.HttpRequestMessage request, Microsoft.Http.HttpResponseMessage& response, System.Object& state) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpStageProcessingAsyncResult.NextRequest (Microsoft.Http.HttpStageProcessingAsyncResult self) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Microsoft.Http.HttpStageProcessingAsyncResult.Complete (Microsoft.Http.HttpStage stage, System.Exception e) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpStageProcessingAsyncResult.NextRequest (Microsoft.Http.HttpStageProcessingAsyncResult self) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpStageProcessingAsyncResult..ctor (Microsoft.Http.HttpStageProcessingAsyncState state, System.AsyncCallback callback, System.Object user) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpClient.Send (Microsoft.Http.HttpRequestMessage request) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpClient.Send (HttpMethod method, System.Uri uri, Microsoft.Http.Headers.RequestHeaders headers, Microsoft.Http.HttpContent content) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpClient.Send (HttpMethod method, System.Uri uri) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpMethodExtensions.Method (Microsoft.Http.HttpClient client, HttpMethod method, System.Uri uri) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpMethodExtensions.Method (Microsoft.Http.HttpClient client, HttpMethod method, System.String uri) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpMethodExtensions.Get (Microsoft.Http.HttpClient client, System.String uri) [0x00000] in <filename unknown>:0
at mshttpsample.MyFIle.Main (System.String[] args) [0x0000b] in /Users/mauricio/projects/mono/ms-http-sample/ms-http-sample/MyFIle.cs:25
[ERROR] FATAL UNHANDLED EXCEPTION: Microsoft.Http.HttpStageProcessingException: Cannot cast from source type to destination type. ---> System.InvalidCastException: Cannot cast from source type to destination type.
at Microsoft.Http.HttpWebRequestTransportStage+HttpTransportAsyncResult.CreateAndPrepareWebRequest (Microsoft.Http.HttpTransportAsyncResult self) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpWebRequestTransportStage+HttpTransportAsyncResult..ctor (Boolean preferSync, Microsoft.Http.HttpRequestMessage request, Microsoft.Http.HttpWebRequestTransportSettings settings, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpWebRequestTransportStage.ProcessRequestAndTryGetResponse (Microsoft.Http.HttpRequestMessage request, Microsoft.Http.HttpResponseMessage& response, System.Object& state) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpStageProcessingAsyncResult.NextRequest (Microsoft.Http.HttpStageProcessingAsyncResult self) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Microsoft.Http.HttpStageProcessingAsyncResult.Complete (Microsoft.Http.HttpStage stage, System.Exception e) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpStageProcessingAsyncResult.NextRequest (Microsoft.Http.HttpStageProcessingAsyncResult self) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpStageProcessingAsyncResult..ctor (Microsoft.Http.HttpStageProcessingAsyncState state, System.AsyncCallback callback, System.Object user) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpClient.Send (Microsoft.Http.HttpRequestMessage request) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpClient.Send (HttpMethod method, System.Uri uri, Microsoft.Http.Headers.RequestHeaders headers, Microsoft.Http.HttpContent content) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpClient.Send (HttpMethod method, System.Uri uri) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpMethodExtensions.Method (Microsoft.Http.HttpClient client, HttpMethod method, System.Uri uri) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpMethodExtensions.Method (Microsoft.Http.HttpClient client, HttpMethod method, System.String uri) [0x00000] in <filename unknown>:0
at Microsoft.Http.HttpMethodExtensions.Get (Microsoft.Http.HttpClient client, System.String uri) [0x00000] in <filename unknown>:0
at mshttpsample.MyFIle.Main (System.String[] args) [0x0000b] in /Users/mauricio/projects/mono/ms-http-sample/ms-http-sample/MyFIle.cs:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment