This problem occurs because, when you connect to Forefront UAG, it stores the original URL that you tried to access before Forefront UAG redirects you through the Forefront UAG logon process. If you access a URL that corresponds to a published web application that is listening on a nonstandard HTTPS port, Forefront UAG cannot translate the internal Protocol:Host:Port combination correctly. This situation occurs in code that is called from StartApp.asp. This code only runs during the first request that a client makes to an application. Therefore, the problem does not occur on successive requests.