I had the same thing with the door lock (02 C240) happen to me a few months back. Hit the remote to lock or unlock the doors, and the door lock would bounce up and down 3 or 4 times. Sometimes it wouldn't lock automatically, would have to use the manual key sometimes.
I ended up purchasing a new auto lock assembly (made by Hella) from the dealer
and installed it myself. I asked one of the mechanics how long it would take and how difficult to change. You need to have some mechanical knowledge and it will take somewhere between 2-3 hours (took me a little longer). You also need to drill out some pop rivets to make the job a bit easier. The mechanism is fairly tight to remove and re-install. The pop rivets will have to be replaced when the door latch mechanism is in place. MB will also sell you the pop rivets. I'll have to admit, it was a bit fustrating at times to shoe horn that thing in and line it up. It's done and it works great!
Someone mentioned to pull up the rubber boot that slides over the door pull rod and to put some lube on the rod. You may want to try this out first. Just remove the door panel and you will see the rubber boot. Nothing to lose by trying this first. (this was dicsussed in an old thread, you can do a search "door locks").