This is a problem with the servers of Apple. Sometimes you have to simply restart the PC and the issue will be fixed by itself. However, go to Start and search for Internet Options. Additionally, check the Connection tab in the Internet options and make sure that you don't use any proxy servers.
Also, iTunes needs to be updated to the latest version. On iPhone, there isn't much you can do since we know that Apple limits the user's rights when it comes to performing maintenance tasks. Reboot the iPhone and try again. Check for available updates as well.