title: HttpRequestBase.GetBufferedInputStream not found when doing a WebAPI 2 JSON Post
body: <ol>
  <li>Created a MVC5 WebAPI2 project using Visual Studio</li>
  <li>Created a basic JSON POST</li>
  <li>Post arguments cause HttpRequestBase.GetBufferedInputStream not found  failure</li>
  </ol>
  
  <p>Works on:</p>
  
  <ol>
  <li>Windows with visual studio</li>
  </ol>
  
  <p>Fails on:</p>
  
  <ol>
  <li>OSX Xamarin</li>
  <li>Gentoo Xamarin</li>
  </ol>
  
  <p>Test application: <a href="https://github.com/shaunstepanowich/mono-webapi2-test" rel="noreferrer">Mono MVC5 Web API2 Test Case</a></p>
  
  <p>Test procedure:</p>
  
  <ol>
  <li>run the MVC application in xamarin</li>
  <li>On load the page will do a ajax post to the server.</li>
  <li><p>a) server will return a 500 error on failure</p>
  
  <p>b) console.log post arg on success</p>
  
  <pre><code>Error: {
      "Message": "An error has occurred.",
      "ExceptionMessage": "Method 'HttpRequestBase.GetBufferedInputStream' not found.",
      "ExceptionType": "System.MissingMethodException",
      "StackTrace": " at System.Web.Http.WebHost.HttpControllerHandler+LazyStreamContent.get_StreamContent () [0x00008] in :0
  
                      at System.Web.Http.WebHost.HttpControllerHandler+LazyStreamContent.CreateContentReadStreamAsync () [0x00000] in :0
  
                      at System.Net.Http.HttpContent+c__async2.MoveNext () [0x00095] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/System.Net.Http/System.Net.Http/HttpContent.cs:159
  
                      --- End of stack trace from previous location where exception was thrown ---
  
                      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201
  
                      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
  
                      at System.Runtime.CompilerServices.TaskAwaiter`1[System.IO.Stream].GetResult () [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:372
  
                      at System.Net.Http.HttpContentExtensions+d__0`1[System.Object].MoveNext () [0x00080] in :0
  
                      --- End of stack trace from previous location where exception was thrown ---
  
                      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201
  
                      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
  
                      at System.Runtime.CompilerServices.TaskAwaiter`1[System.Object].GetResult () [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:372
  
                      at System.Web.Http.ModelBinding.FormatterParameterBinding+d__0.MoveNext () [0x000a5] in :0
  
                      --- End of stack trace from previous location where exception was thrown ---
  
                      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201
  
                      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
  
                      at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:124
  
                      at System.Web.Http.Controllers.HttpActionBinding+d__0.MoveNext () [0x000a0] in :0
  
                      --- End of stack trace from previous location where exception was thrown ---
  
                      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201
  
                      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
  
                      at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:124
  
                      at System.Web.Http.Controllers.ActionFilterResult+d__2.MoveNext () [0x0008f] in :0
  
                      --- End of stack trace from previous location where exception was thrown ---
  
                      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201
  
                      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
  
                      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
  
                      at System.Runtime.CompilerServices.TaskAwaiter`1[System.Net.Http.HttpResponseMessage].GetResult () [0x00000] in /private/tmp/source-mono-mac-4.0.0-branch-c5sr4/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.4/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:372
  
                      at System.Web.Http.Dispatcher.HttpControllerDispatcher+d__1.MoveNext () [0x0018d] in :0 "
  }
  </code></pre></li>
  </ol>