{"action":"created","issue":{"url":"https://api.github.com/repos/darrencauthon/csharp-sparkpost/issues/111","repository_url":"https://api.github.com/repos/darrencauthon/csharp-sparkpost","labels_url":"https://api.github.com/repos/darrencauthon/csharp-sparkpost/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/darrencauthon/csharp-sparkpost/issues/111/comments","events_url":"https://api.github.com/repos/darrencauthon/csharp-sparkpost/issues/111/events","html_url":"https://github.com/darrencauthon/csharp-sparkpost/issues/111","id":181685840,"number":111,"title":"Header problem on Mono","user":{"login":"Evengard","id":798735,"avatar_url":"https://avatars.githubusercontent.com/u/798735?v=3","gravatar_id":"","url":"https://api.github.com/users/Evengard","html_url":"https://github.com/Evengard","followers_url":"https://api.github.com/users/Evengard/followers","following_url":"https://api.github.com/users/Evengard/following{/other_user}","gists_url":"https://api.github.com/users/Evengard/gists{/gist_id}","starred_url":"https://api.github.com/users/Evengard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evengard/subscriptions","organizations_url":"https://api.github.com/users/Evengard/orgs","repos_url":"https://api.github.com/users/Evengard/repos","events_url":"https://api.github.com/users/Evengard/events{/privacy}","received_events_url":"https://api.github.com/users/Evengard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-07T14:38:29Z","updated_at":"2016-10-07T20:24:05Z","closed_at":null,"body":"This library worked like a charm under Windows and .NET 4.5, but when trying to run the same app under Mono, it crashed somewhere inside the sending logic with a System.FormatException with this stacktrace:\r\n\r\n```\r\n[System.FormatException]: One of the identified items was in an invalid format.\r\n  at System.Net.Http.Headers.HttpHeaders.AddInternal (System.String name, System.Collections.Generic.IEnumerable`1[T] values, System.Net.Http.Headers.HeaderInfo headerInfo, System.Boolean ignoreInvalid) [0x0004c] in <3dff384e916e4a45850531402c5defd9>:0 \r\n  at System.Net.Http.Headers.HttpHeaders.Add (System.String name, System.Collections.Generic.IEnumerable`1[T] values) [0x0001b] in <3dff384e916e4a45850531402c5defd9>:0 \r\n  at System.Net.Http.Headers.HttpHeaders.Add (System.String name, System.String value) [0x00000] in <3dff384e916e4a45850531402c5defd9>:0 \r\n  at SparkPost.RequestSenders.AsyncRequestSender+<Send>c__async0.MoveNext () [0x00095] in <6b893430194846f1b88010ebc191959b>:0 \r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at SparkPost.Transmissions+<Send>c__async0.MoveNext () [0x000c4] in <6b893430194846f1b88010ebc191959b>:0\r\n```\r\n\r\nAll I was trying is to do a `sparkpostClient.Transmissions.Send(message).Wait();`"},"comment":{"url":"https://api.github.com/repos/darrencauthon/csharp-sparkpost/issues/comments/252352285","html_url":"https://github.com/darrencauthon/csharp-sparkpost/issues/111#issuecomment-252352285","issue_url":"https://api.github.com/repos/darrencauthon/csharp-sparkpost/issues/111","id":252352285,"user":{"login":"Evengard","id":798735,"avatar_url":"https://avatars.githubusercontent.com/u/798735?v=3","gravatar_id":"","url":"https://api.github.com/users/Evengard","html_url":"https://github.com/Evengard","followers_url":"https://api.github.com/users/Evengard/followers","following_url":"https://api.github.com/users/Evengard/following{/other_user}","gists_url":"https://api.github.com/users/Evengard/gists{/gist_id}","starred_url":"https://api.github.com/users/Evengard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evengard/subscriptions","organizations_url":"https://api.github.com/users/Evengard/orgs","repos_url":"https://api.github.com/users/Evengard/repos","events_url":"https://api.github.com/users/Evengard/events{/privacy}","received_events_url":"https://api.github.com/users/Evengard/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T20:24:05Z","updated_at":"2016-10-07T20:24:05Z","body":"After all the original problem was from my side - the api key was somehow null in the Mono config, that was the cause of this error. But the problem is that fixing it didn't helped.\r\n\r\nThe new stacktrace is even more weird than the previous. `[System.MissingMethodException]: Method 'System.Net.WebHeaderCollection.AddValue'; not found.` somewhere in the internals. What might be the cause of that I have no ideas.\r\n\r\n```\r\n[System.AggregateException]: One or more errors occurred.\r\n  at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00014] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00052] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Threading.Tasks.Task.Wait () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at SparkPost.RequestSenders.SyncRequestSender.Send (SparkPost.Request request) [0x0002c] in <6b893430194846f1b88010ebc191959b>:0 \r\n  at SparkPost.RequestSenders.RequestSender.Send (SparkPost.Request request) [0x00006] in <6b893430194846f1b88010ebc191959b>:0 \r\n  at SparkPost.Transmissions+<Send>c__async0.MoveNext () [0x00075] in <6b893430194846f1b88010ebc191959b>:0 \r\n\r\n[System.MissingMethodException]: Method &#39;System.Net.WebHeaderCollection.AddValue&#39; not found.\r\n  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x00031] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Net.Http.HttpClientHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00024] in <3dff384e916e4a45850531402c5defd9>:0 \r\n  at System.Net.Http.HttpMessageInvoker.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00000] in <3dff384e916e4a45850531402c5defd9>:0 \r\n  at System.Net.Http.HttpClient.<SendAsync>__BaseCallProxy0 (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00000] in <3dff384e916e4a45850531402c5defd9>:0 \r\n  at System.Net.Http.HttpClient+<SendAsyncWorker>c__async0.MoveNext () [0x00089] in <3dff384e916e4a45850531402c5defd9>:0 \r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at SparkPost.RequestSenders.AsyncRequestSender+<GetTheResponse>c__async1.MoveNext () [0x00086] in <6b893430194846f1b88010ebc191959b>:0 \r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at SparkPost.RequestSenders.AsyncRequestSender+<Send>c__async0.MoveNext () [0x00135] in <6b893430194846f1b88010ebc191959b>:0 \r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 \r\n  at SparkPost.RequestSenders.SyncRequestSender+<Send>c__AnonStorey6+<Send>c__async5.MoveNext () [0x0007a] in <6b893430194846f1b88010ebc191959b>:0 \r\n```"}}
{"actor":{"display_login":"Evengard"}}