Are we supposed to write code differently to handle running through a system proxy for Http requests?
I have developed an application which uploads many files from a clients network over the internet via a REST API over a long period of time. I run it on a PC in their domain.
However, when I run it on one particular clients environment, after some arbitrary amount of time, all the requests start throwing an exception:
407 Proxy Authentication required.
The PC is configured to use a proxy. I don't specify any proxy information in my code, so my assumption is that it is just using the system proxy.
If I pause the uploads and wait a while before resuming, it seems to resolve the issue.
If I run multiple instances of my application on this machine at the same time, one may begin returning 407 exceptions while the other is humming away fine.
There is retry logic in the app, where when any given file will retry 3 times before giving up. I have never witnessed it recover from this 407 error when retrying (while it does recover on other types of errors).
Occasionally an individual file will get this error, as opposed to it happening for all uploads for a period of time.
Also, it may actually always behave this way when running through a proxy. This is just the first client I've had to run the app for that has had one configured.
I am at a complete loss as to whether this is a proxy configuration issue on the clients side, or an issue with my application.
I apologise if this isn't the correct StackExchange forum, I did post this on StackOverflow but it got no traction, so I am attempting to attack the problem from another angle.