Security Certificate error in WebBrowser

1

I'm working on a winforms program that basically uses WebBrowser to access the federal revenue site using the digital certificate.

My problem is as follows, first of all, I got this project ready and I'm hammering it as needed, it needs to be accessed by IE (no matter the version), access is made from time to time and can be idle for a long time.

It turns out that after a lot of idle time it crashes IE Security Certificate error and no longer leaves.

I have tried to close the instance, but always end up skipping some popup from IE and needing user intervention (to give OK in the message).

Obs : I already added the site to the trust, I already added the site's certificate, I'm already using ScriptErrorsSuppressed = true and already tried to force navigation to another page , but the program hangs. It is configured in IE to use the digital certificate without having to request it.

    
asked by anonymous 01.02.2017 / 11:28

1 answer

1

Sites with certificates are complicated to use with webbrowser. As I came across this problem, I initially decided to make a thread to monitor when the script window appears and play an ENTER on the key. this works only when it has 1 certificate, however, the window can not lose focus.

The ideal serial solution to use httpwebrequest.

    
06.11.2017 / 15:54