force only port 80 for CHttpConnection?
Posted on 2007-11-29
I have a program written in C++ (MFC) that makes http connections for various tasks - registration, downloading updates, etc. Alot of my customers are in school districts with very strict firewalls, so what I need to do is restrict the program to only use port 80, which is allowed through the firewalls.
I pass port 80 when opening the connection:
pHttpconnection = session->GetHttpConnection((LPCTSTR)m_sURL,(INTERNET_PORT)80);
but when I check the open ports during operation, they are all over the board. Using the program "Open Ports Scanner" I get port 1110 as the remote port, and local ports ranging anywhere from around 2200 to 3200.
Is there any way to force only using port 80? If not, can someone offer a solution to the firewall issues that I am encountering?