"It's a document of Vienna," says Gerhard Strassgschwandtner, proudly, as he shows me around his Third Man Museum. It's spread across eight rooms below the Viennese apartment where he lives, and the place is overflowing with Third Man ephemera: ancient press cuttings, autographed photos, even the zither Anton Karas used to play the film's famous theme tune.

If this museum was in Britain, it might strike you as a bit obsessive, but here in Vienna it's even more unusual. For although Britain's greatest movie was filmed in Vienna, it's actually a lot less popular in Austria than it is abroad, because it depicts a time most Austrians would far rather forget.

Carol Reed filmed The Third Man in Vienna in 1948, during that brief, uneasy truce between the end of the second world war and the onset of the cold war. It won an Oscar and the Golden Palm at Cannes but it wasn't a hit in Vienna. The local critics were underwhelmed. The film only ran for a few weeks. Looking back, you can see why the locals didn't warm to The Third Man. They wanted films to make them forget their worries, to remind them how things used to be. Instead, they got a bleak foreign drama, filmed by the victorious Allies in the ruins of their hometown. "A city fearful of its present, uncertain of its future," declared the breathless trailer, but it wasn't quite so thrilling if you actually had to live here. For the Viennese, this was an era of hardship and humiliation, a grinding struggle for food and fuel. People had to make huge moral compromises simply to survive. As a black market racketeer in The Third Man confesses, speaking for every Austrian of his generation: "I've done things that would have seemed unthinkable before the war."

When Graham Greene came here to research his screenplay for the film, Vienna was still under occupation, divided into British, French, American and Soviet zones. Strassgschwandtner is too young to remember the occupation, but when he was growing up in Austria the 1960s the subject was still taboo. "For me, that time between 1945 and 1955 was very interesting because we didn't hear anything about it in Austria," he says, guiding me through his eccentric exhibition, which uses Reed's film as a window on a repressed period of Viennese history.

And that's why, in Vienna, The Third Man is so revealing. In Britain it's a thriller about friendship and betrayal. In Vienna it's a tragedy about Austria's troubled relationship with its past. "People did not want to be reminded," says Brigitte Timmermann, the Austrian author of The Third Man's Vienna. "They had gone through the worst and they didn't want to talk about it." Timmermann likens it to America's attitude to Vietnam. "It was suppressed, it wasn't talked about, it was covered up," she says. "It takes one or two generations to deal with such a terrible trauma."

Vienna's ambivalence about The Third Man betrays its ambivalence about its heritage. Was Vienna conquered or liberated by the Allies? Was the Anschluss an invasion or an alliance? Were the Austrians the first victims of the Third Reich, or its first partners in crime? The Third Man is Vienna's guilty secret, lurking in the shadows like Harry Lime. The only real reminder of the film's Vienna is a small cinema on the Opernring, where, several times a week, you can watch The Third Man. The film reveals the great divide between Vienna's cosy public image and its painful memories. The film's locations have been spruced up, but in its melancholy corner cafes, Reed's bleak vision of a vanquished metropolis survives. Beneath its modern polish, Vienna is still grand, absurd and slightly sinister: an imperial capital without an empire.

· The Third Man Museum (Pressgasse 25, Vienna; www.thirdmanmuseum.com) Saturdays, 2pm to 6pm. The Third Man Walk (www.viennawalks.com) departs from Vienna's Stadtpark Station every Monday and Friday at 4pm.