"You advance another 10 feet and get to the end of the corridor, where a door is welcoming you. What do you do? -I try to open it. -It's locked."
All of us, GMs probably recognize this incident from our past experiences. Some of us even tried to solve it, or however we wanna call it. But the locked door is only a symptom to something else. You see, if the locked door is the only way to advance the story, and the characters aren't able to open it, for one reason or another, then the story slides to a halt, just like when they fail to get a clue.
Some of us GMs try to solve it by creating more doors, or by letting the players break it, but that's not the solution. The real solution is that there's no door in the first place. Like in the movie The Matrix, where the child tells Neo that he'll bend the spoon only when he'll understand that there's no spoon, so it is here: The real solution is discarding the door, throwing it to the garbage, eradicating it and many many other names can do the same. If the door is the only way to advance the plot, there should be no door, but an open hallway.
The door can be of course called by other names, like a chest, or a clue, an NPC or something entirely else. There should always be other ways to solve the problem and to advance the plot, or there should be no problem to begin with.
If there are more than enough ways to solve the problem, blocking one of them might not be that harsh to the players, but it might surely be harsh if the characters can't find another way.
But there are places when there should be locked doors and chests: When it's not the only way to advance the plot, or preferably not connected to advance it. Comes to my mind a chest that I used in a campaign from last year. Within it, I used a locked chest. The characters had blockaded a village and stormed within, killing goblins and their slaves, 'til they arrived to the blacksmith's cabin. They found there a chest, and when they tried to open it, it was locked. They afterwards came back to the village again and again to find what was within it. It wasn't important to the story, it was just there, locked and... Empty.
So what am I trying to say? If it's the only way, don't block the path, and if it's not important but can bring a bonus, make it harder for them. I never believed that 0 or 1 is the only way to solve problems, but that no problem should be 0 or 1.
How about you?