Clearing WebBrowser control's cookies for all sites WITHOUT clearing for IE itself

后端 未结 2 474
说谎
说谎 2021-02-01 22:19

EDIT: As far as I know, there is no solution to this problem, making it yet another testament to the fact that one should not use C#\'s WebBrowser. We ended up with a warning si

2条回答
  •  别跟我提以往
    2021-02-01 22:51

    That comment at How to set and delete cookies from WebBrowser Control for arbitrary domains is a mistake. The WinInet cache folder setting is apparently not in IE settings but is a Shell folder setting, since IDocHostUIHandler2 can only customize settings stored in IE's registry key it is not useful for this task. I don't know a way to customize the folder location except to hook all WinInet APIs (and stuck with updating application to accommodate future WinInet APIs), which is not easy in C#. I will update the old post now.

提交回复
热议问题