Hi Jorge,
I think you may have got it reversed, or I am not understanding you correctly.
My understanding is that web addresses are the following:
- hcp.mydomain.pt = the externally known address of your applications (for use for external clients)
- hcp-proxy.mydomain.pt = the inernal (and local) address of your application, one that works for internal clients.
If this is correct then you have got the force settings wrong.
Think of it this way. When Visual WebGui renderes it's contents, the resulting resources (Html, JS, etc.) will contain a bunch of fully qualified Urls that will reference something within your application. By default, Visual WebGui will render these fully qualified Urls with the default address of your application, which in this case is http://hcp-proxy.mydomain.pt. This is what happes for inside users when they access your application via the http://hcp-proxy.mydomain.pt address.
For external users, they will request your application via http://hcp.mydomain.pt, which will be intercepted by the proxy and reverse-proxy-ed to your internal http://hcp-proxy.mydomain.pt. When your Visual WebGui application receives that request, it still thinks it's beeing addressed by http://hcp-proxy.mydomain.pt (that's the purpose of the revers proxy), so it will render all it's contents with all fully qualified Urls pointing that way. When that response is received by the client, say it's a reference to a javascript resource, the client will try to load it, and it will request it at http://hcp-proxy.mydomain.pt, as that's what the response will tell it to do.
Here is where the ForceDomain will kick in, and you want to set it to "http://hcp.mydomain.pt" as that's where the proxy will receive it and reverse-proxy it correctly. Same with the ForcePort, meaning that if the reverse-proxy is proxying your application on a different port than the port used for reverse-proxying, then you will have to force a different port etc.
You should pay attention to the fact that if you have internal users (users inside of the reverse-proxy) that will use this same application without going through the proxy, they will also be affected by the ForceDomain setting, so if your internal (local) dns is not pointing the hcp-proxy.mydomain.net to a local address, they will also go through the proxy address and be reverse proxy-ed. If that is a problem, you may have to set up a seperate application within IIS to serve local clients.
Hope this explains, but don't hesitate to ask if you need further help.
Palli