Experts are calling for a massive increase in routine testing for HIV to try to combat the spread of the virus.
Access to tests is limited
Figures show that over 90% of people carrying HIV do not know they have it.
Dr Kevin De Cock, of the World Health Organization, said empowering doctors to test patients could have a significant effect.
However, other delegates at the 16th international conference on HIV and Aids in Toronto expressed concerns over civil liberties.
They say testing must be accompanied by comprehensive treatment and support programmes, and that informed consent is vital.
The number infected with HIV disease now tops 45 million, and 25 million are estimated to have died from Aids-related illness.
Dr De Cock said it was "appalling" that only around 10% of people infected with HIV were aware of their condition.
He said the WHO could not accept that patients were flocking to health centres across the world, but were not being tested for HIV.
Efforts to combat the spread of the virus were severely compromised by the fact that many people were simply not aware of the risk they posed to others.
Dr De Cock said although new treatments for HIV had become much more widely available, prevention of new infections remained vital.
There are concerns that some people who might suspect they are infected are unwilling to take tests, fearing discrimination, stigma and an erosion of their own basic rights in often developing societies.
However, it is thought that just 12% of people worldwide who want a test have access to it.
Dr De Cock said: "Prevention has to be at the centre of our response.
"We are not going to solve this epidemic just by scaling up treatment.
"We have to provide prevention advice and service to people living with HIV."
Threat of violence
John Tedstrom, of the Global Business Coalition on HIV/Aids, said it was impossible to engage in appropriate prevention, counselling and treatment programmes if millions of people carrying the virus had not been identified.
Joanne Csete, of the Canadian HIV/Aids Legal Network, said routine testing was fine - provided people had the option to turn down the test, and were given adequate pre-test counselling.
"HIV is not like other diseases. Women do not get abandoned by their communities, or beaten up by their partners for having other diseases in the way that still unfortunately happens with HIV.
"WHO has shown that there is a significant percentage of women in many heavily affected countries who can expect to face violence when it is known that they are HIV positive."