I working with some API that need to run with async (an await in body also) but it throw an exception like this:
System.NullReferenceException: Object reference not set to an instance of an object.
when I call that api without define defaultProxy
in WebConfige. But in my solution I cannot define defaultProxy
because it will interrupt some other process.
I also read this post but cannot find the solution :(
So do we have anyway to run the async method without await like create background thread to run some method like ReadAsStreamAsync
(just an example).