1. In the search box on the taskbar, type Command prompt, press and hold (or right-click) Command prompt, and then select Run as administrator > Yes.
2. At the command prompt, run the following commands in the listed order, and then check to see if that fixes your connection problem:
Close command Prompt and hopefully you WiFi / Ethernet is working OK again.
netsh winsock reset netsh int ip reset ipconfig /release ipconfig /renew ipconfig /flushdns