visual-studiovisual-studio-2022

Very slow loading of Visual Studio when I am connected to VPN


I am facing an issue where Visual Studio (both 2022 and 2019) takes up to 10 minutes to fully load a project. From clicking the shortcut to start visual studio to select and fully load a project. Rebuild events are also very slow.

This behavior is only happening when I am connected to VPN and SiPolicy.p7b is in place.

Any idea what could be causing this strange behavior?


Solution

  • If you said that without SiPolicy.p7b it works well but with it there are problems it means that this strange behavior could be caused by network restrictions. What I can suggest is to verify onto the configurations if there's something about network restrictions or if SiPolicy.p7b requires certificates not available in VPN or if there are any available check that there are no restrictions , because the problem is only when you have both VPN and SiPolicy.p7b working together.

    When you are connected to VPN with SiPolicy you have CRL/OCSP certificates that are used to verify the digital signature and maybe for that, requests can't be reachable or in your case, very slow.

    Since SiPolicy.p7b is a WDAC policy, it can force the system to run only digitally signed code and often requires verification via external servers CRL/OCSP that the certificate has not been revoked.

    The fact that with VPN but without SiPolicy works it's because Windows doesn't enforce rigorous signature verification, and with SiPolicy but without VPN it's because the system can normally access the validation servers (CRL/OCSP).