Closed koderi-dp closed 4 years ago
@koderi-dp do you have a stack trace so we can point to the exact line number? You suggest by then it is working because you've made that change and verified the fix?
You could add Sentry to your app so errors would be sent there even if your logging isn't working.
@koderi-dp do you have a stack trace so we can point to the exact line number? You suggest by then it is working because you've made that change and verified the fix?
You could add Sentry to your app so errors would be sent there even if your logging isn't working.
Hi, exception was in line where status code is checked, if (httpResponse.StatusCode != HttpStatusCode.Created && httpResponse.StatusCode != HttpStatusCode.OK)
I had to download the source change it like in sugestion (put it in using without manualy closing the connection) and its working without issues, it looks if you acces status code prop of disposed response it will throw exception, didnt go into reflection of source code, maybe connected to net standard or net core version
Library in which your nuget was is in netstandard 2.0 and app that used it was in netcore 2.2
Makes sense. Would you open a PR with the fix for this? Happy to accept PRs
Makes sense. Would you open a PR with the fix for this? Happy to accept PRs
Sure
Hi,
when using this library in net core console app 2.2, i get exception
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Net.HttpWebResponse'.
i think problem is in this part (httpResponse.Close)
why not change it to
then it is working