We have an app (excel add-in) that is configured to get it's proxy settings from IE (WinInet). This is how most modern apps work these days, they just hook into your system/IE proxy settings and use them. IE settings are to use a PAC file script and works fine for all other apps without issue.
This app will work for several hours then it just breaks. The issue is very inconsistent. We used Wireshark to capture the network traffic and found that when it breaks it is because it is bypassing the proxy and trying to go direct. I have seen this sort of thing before, but it either works 100% or doesn't 100%. In this case, you can see in the network that the app IS using the proxy and working fine; then for some odd reason it decided to go direct.
Here is what I have observed and my thoughts:
Based on the above, my conclusion is that the app is the problem. However, the vendor claims that no other customer of theirs has this issue so they are refusing to look into it. I am inclined to believe them to be fair, because it is Oracle and they have told me that there are some massive enterprises using this.
In all my years in IT I have never seen this behaviour - where an app is trying to go direct to the Internet when it is configured to use a proxy/PAC file (assuming it is configured correctly of course).
- When it works or fails, the URL it is going to is exactly the same – this rules out any specific rules in the PAC causing the issue
- When it fails, before and after I can see successfully proxy connections to other URLs using other apps like IE – this rules out the proxy not being accessible at the time of the issue.
- The PAC file is very simple are there are no rules to send any traffic “Direct”.
- At one point, I thought that maybe the server which hosts the PAC file might not be accessible at the exact time the app tries to access the Internet. However, I ruled this out by the fact that other apps work fine at the time of this error. I also created a PowerShell script which constantly did a GET to retrieve the http status 200 when the error happened. This all came back fine which suggests no issues with the PAC file server.
Where I am going to look next is to investigate the process around what happens when the PAC file is downloaded. Does anyone know how to troubleshoot or enable logging for WinInet? I cannot find anything about this on the Internet.