Make sure that your IP and DNS settings are correct in the D2. Also any encryption as well.
Are you connecting to a router? If so, make sure your security settings are correct, and allow the D2 to access the internet, ie, allowing the MAC address.
HTC Desire A8183
Firmware 2.1 Update 1