The AirLink, Foscam, and Linksys cameras that we own we configured like rjgvt mentioned: Connected via Ethernet cable, and then configured the WiFi settings through the web browser. We don't have experience with D-Link cameras, but I would assume that it would be similar. (Then again, it might not be.)
One issue we did have back-in-the-day was with the Foscam cameras not connecting to WiFi networks that had strange characters (like '$') in the WPA password. If you are able to configure the D-Link's wireless settings, you might try making your router's WiFi settings temporarily less complicated (removing or simplifying passwords, broadcasting the SSID) to see if you can pinpoint the issue.