Ungunbu: please state exactly your actions
I already did... But I'll give you a more elaborate explanation.
The switches do not work as long as the door is open. Therefore, you need to use them before you open the door. In order to figure out which switch controls which bulb, you turn them on and off one by one.
Once you've turned on ONE switch, you open the door to see which bulb is lit. Your riddle states that you cannot operate the switches while the door is open, which means you need to close the door every time you want to operate the switches. What your riddle does
not say, and which I must therefore assume is
not true,is that the bulbs stop working when you open the door. Therefore, I conclude that if you operate a switch prior to opening the door, you will be able to see which bulb is lit up when you open the door (since the door's status has no effect on the bulbs).
TL;DR:
While the status of the door affects the operability of the switches, it does not affect the operability of the bulbs.
Ungunbu: you can open the door but then you can't operate the switches anymore (even if you close it again!)
Well, that's kind of an imperative bit of information you left out there. :)