Solution #1The most simple and commonly suggested solution is to reset the date and time or to check the date/time-related settings and then restart the system. This can be done by accessing time and date settings in control panel.
Solution #2If the method mentioned above doesn't work then try reinstalling the iTunes program, this might fix the problem. If still, the problem persists, try repairing the registry entries associated with error 9815 in Run>>regedit. By now the problem would’ve been solved.
Solution #3Another most common cause for this error is the windows firewall blocking the internet access to the program. This issue can be overcome by running the program in Administrator using Run As Administrator command.
Solution #4The problem also exists if some malicious program accidently deletes the files associated with this program. Then run a full PC scan and reinstall the program. You can use free antivirus service for this. These methods can be used when the error is shown in iTunes software on your system.
Solution #5For a MAC, if the firewall blocks then disable the firewall in OS X and run the program. If the host file blocks the iTunes store, then log in as administrator on your Mac, open the Terminal utility>>host file by typing “sudo nano/private/etc/hosts” and press return.
It requests a nonblank password so type your administrator password. The host file contains comments and default hostname mappings. Find an entry containing “apple.com”, then add # and space. This resolves the problem.