Switch/sensor is probably bad. The sensor is in the lower portion of the latch located in the door.
Remove the inner door panel, make sure the window is in the up position.
You will see the wires going into the switch.
Unhook the wire connector, with a pair of pliers twist the old switch out. Install new one by inserting it in the hole the old one came out of, twist it a 1/4 turn and it snaps into place, reattach the wire connector, reinstall the inner panel.
DO NOT USE WD40!
This adds oil. Dirt will stick to it. Causing the problem again or making it worse. Go to Radio Shack and get some contact cleaner!