I tried everything like setting auto date and time, installing security update 2015-004, played with keychains, deleted my login keychains, make the keychains of "class 3 public" as trust always , created new admin user, unistalled sophos and little snitch and lot other but nothing worked ................FINALLY i stumbled on this http://apple.stackexchange.com/questions/110940/only-chrome-can-access-the-inte rnet
found that i couldnt ping or curl it was icmp time out
SO for me it was dnsresponder problem...........
followed this need to restart mDNSResponder after every boot up "discussions.apple.com/thread/3514492" to restart my DNS & IT WORKED (i have osx 10.9.5)
It gave me error when i said to unload dns, but when i gave this second command
sudo launchctl load -F /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
seems it wasnt loading on reboot
it loaded the dns and now i can use safari , app store etc
i dont know yet if i have to reload mDNSResponder on reboot or not.. i've to check that later
dont know why chrome was able to connect to internet without this dns and other apps can't?????
Any way i'm done with this after wasting lot of time............