none
Force WinHttp to reload PAC file RRS feed

  • Question

  • Hello everyone. We are currently using PAC proxy. Sometimes we change content of file on the fly and we need to force winhttp to reload (re-cache) pac (because IE still uses old content of file). Is it possible? Thanks.


    • Edited by idzmitry Thursday, June 28, 2018 9:29 AM added little explanation
    • Moved by CoolDadTx Thursday, June 28, 2018 2:15 PM Not a C# question
    Thursday, June 28, 2018 9:27 AM

Answers

  • Finally I figured out. You have to call native 'WinHttpResetAutoProxy' method https://docs.microsoft.com/en-us/windows/desktop/api/Winhttp/nf-winhttp-winhttpresetautoproxy with fake session as first parameter and WINHTTP_RESET_SCRIPT_CACHE | WINHTTP_RESET_ALL | WINHTTP_RESET_OUT_OF_PROC flags as second parameter.
    • Marked as answer by idzmitry Monday, July 2, 2018 9:20 AM
    Monday, July 2, 2018 9:20 AM

All replies

  • This forum is for C# questions only. Your question seems better suited for TechNet. Please post over there.

    Michael Taylor http://www.michaeltaylorp3.net

    Thursday, June 28, 2018 2:15 PM
  • Sorry, I forgot to mention that we have to force WinHttp from C# code.
    Thursday, June 28, 2018 2:30 PM
  • Finally I figured out. You have to call native 'WinHttpResetAutoProxy' method https://docs.microsoft.com/en-us/windows/desktop/api/Winhttp/nf-winhttp-winhttpresetautoproxy with fake session as first parameter and WINHTTP_RESET_SCRIPT_CACHE | WINHTTP_RESET_ALL | WINHTTP_RESET_OUT_OF_PROC flags as second parameter.
    • Marked as answer by idzmitry Monday, July 2, 2018 9:20 AM
    Monday, July 2, 2018 9:20 AM