Problem running WiFiWebClient example
Let's break it down :)


  Please upgrade the firmware


Visit here to upgrade the firmware of your board. Your original post doesn't show the fw version, but could have outdated library references and has been noted many times that outdated fw will not work.

https://www.arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading

Also add this to your project to help us determine your firmware:

  Serial.print("Firmware version: ");
  Serial.println(WiFi.firmwareVersion());


My guess is that it is less than 1.1.0. If the Arduino IDE is out of date, and the board is newer,  the NOT EQUAL TO(!=) may suggest that the firmware is newer than the library which could also be an issue.

Just b/c it connects to your router, doesn't mean that it can still communicate correctly.

One last side note, some versions of Arduino IDE have proven to be problematic with uploading a sketch to a wifi shield. A quick search with your Arduino version followed by the Wifi Shield not connecting could point you in the right direction. eg- Arduino x.xx wifi shield not connecting

Hope this helps!