A former RAF servicewoman has launched a compensation claim against the Ministry of Defence, blaming them for an alleged rape at a barracks in Lincs.
The woman said she was raped in her bed when she was aged 20 at RAF Cranwell after a night out in nearby Sleaford.
She is blaming poor security, resulting in drunken men being able to wander in.
Last December a judge at Teesside County Court rejected her compensation claim. The woman renewed her claim at the Court of Appeal on Tuesday.
The woman, who cannot be named, said the man who raped her had already been in the barracks with another woman.
She suffered post-traumatic stress disorder, depression and anxiety afterwards and was eventually assessed as permanently unfit from service and discharged from the RAF.
Her alleged attacker was jailed for eight years but then had his conviction quashed by the Criminal Appeal Court in 2003.
On Tuesday the woman's barrister, Ronald Walker QC, told three appeal judges: "The MoD failed adequately to address and deal with the number of risks to the safety of female residents...
"It did little, if anything, to prevent the practice of the doors to the corridors being left open or to ensure that men were escorted from the premises at night."
The court heard that at the time of the alleged attack, a simple locking system with a keypad and code was used on corridors and the locks could be "clicked-back", leaving them open.
A new system using electronic key fobs was subsequently introduced.
Mr Walker said the judge at Teesside Crown Court had rejected the case because he said he had no proof from experts the electronic system was safer, so he could not rule the MoD had been in breach of its duty.
But Mr Walker said it was "obvious" the electronic system was safer since it would be impossible to leave doors open.
The case continues.