Reputation: 1230
I have an api endpoint someroute/{someid} that takes a multipart/octet post so that I can accept multiple files.
I'm utilizing .NET Cores MultipartReader to read the files asynchronously.
On my local machine when I test this upload things work great. On my local machine when I run it through our NGiNX proxy to Kestrel in .NET Core it still works great. However when I deploy it to a Docker container within our Linux environment it fails with "Application completed without reading entire request body".
I installed some request logging middleware, and it does seem that the body of the post makes it to Kestrel through NGiNX, but none of the code in my route is invoked.
Again, this works locally on my machine, locally with an NGiNX proxy in front of it.
Any ideas would be helpful.
Upvotes: 0
Views: 2313
Reputation: 1230
Ok, got it figured out for those who may be stuck with this error. In the end this had nothing to do with my NGiNX or docker config. In my constructor for my controller I was reading a configuration value that didn't exist. This threw an exception causing my method to never be invoked.
So for anyone experiencing the "Application completed without reading entire request body..." you may want to check your constructors for issues.
Upvotes: 2