Summary
When accessing Citrix Web Interface embedded into third-party portals, such as Microsoft SharePoint Server or Windows SharePoint Services, through Access Gateway Advanced or Enterprise Edition, Web Interface renders the standard UI and not the UI optimized for use within the Access Gateway Advanced or Enterprise Edition Navigation UI.
The optimized UI may be more desirable when Web Interface is accessed this way; you can force the optimized UI to be rendered with a few simple code modifications on the Web Interface site that has been configured for use with Access Gateway Advanced or Enterprise Edition.
The following screen shot shows a view of the embedded Web Interface in Microsoft SharePoint Portal Server:

Requirements
• Web Interface 4.2 or later
• Access Gateway Advanced Edition 4.2 or later or Access Gateway Enterprise Edition 8.0 or later
• A Web Interface site configured for Advanced Access Control (refer to the Web Interface Administrator's Guide for more details)
• A configured Web resource for the aforementioned site within Access Gateway Advanced Edition with the Web Interface Web Application template selected (refer to the Access Gateway Advanced Edition Administrator's Guide for more details)
Background
By default, Web Interface decides which UI to render based on whether the user’s home page is the Navigation UI. You can force Web Interface into the Navigation UI-style display by editing the file containing the logic that determines the configured access method and referrer. This file change overrides the logic and forces the display of the Navigation UI-optimized UI.
Procedure
Web Interface 4.2:
1. Open the site/serverscripts/include.cs file.
2. Make a backup copy of this file prior to making any edits.
3. Find the getAGEAccessMode() method and change the return statement so that it always returns AGEAccessMode.EMBEDDED. Refer to the two lines of code in bold below. Comment out the first line and add the second line.
/**
* Gets the access mode of the site when the Web Interface is being accessed via
* Access Gateway Enterprise. The access method determines the behavior of the
* site.
*
* @return the current access mode, or null if the access mode was not recognized
* or the site is not being accessed via AGE.
*/
public AGEAccessMode getAGEAccessMode() {
bool AGEIntegrationEnabled = getAuthenticationConfiguration().isEnabledMethod(AuthMethod.AGE_PASSTHROUGH);
AGEAccessMode accessMode = Session[SV_AGE_ACCESS_MODE] as AGEAccessMode;
//return AGEIntegrationEnabled ? accessMode : null;
return AGEAccessMode.EMBEDDED;
}
4. Save the file.
5. Test access to the optimized UI through Access Gateway.
Web Interface 4.5 or 4.6:
1. Open the <site-root>\app_data\site\serverscripts\include.aspxf file.
2. Make a backup copy of this file prior to making any edits.
3. Find the getAGEAccessMode() method and change the return statement so that it always returns AGEAccessMode.EMBEDDED. Refer to the two lines of code in bold below. Comment out the first line and add the second line.
/**
* Gets the access mode of the site when the Web Interface is being accessed via
* Access Gateway Enterprise. The access method determines the behavior of the
* site.
*
* This method will return null if called before authentication has
* completed.
*
* @return the current access mode, or null if the access mode was not recognized
* or the site is not being accessed via AGE.
*/
public AGEAccessMode getAGEAccessMode() {
AGEAccessMode accessMode = Session[SV_AGE_ACCESS_MODE] as AGEAccessMode;
//return isAGEIntegrationEnabled() ? accessMode : null;
return AGEAccessMode.EMBEDDED;
}
4. Save the file.
5. Test access to the optimized UI through Access Gateway.
Web Interface 5.0 or later:
1. Open the <site-root>\app_code\PagesJava\com\citrix\wi\pageutils\AGEUtilities.java file.
2. Make a backup copy of this file prior to making any edits.
3. Find the getAGEAccessMode() method and change the return statement so that it always returns AGEAccessMode.EMBEDDED. Refer to the two lines of code in bold below. Comment out the first line and add the second line.
/**
* Form of getAGEAccessMode used when initializing the WIContext (hence package/default
* visibility)
*/
static AGEAccessMode getAGEAccessMode(WebAbstraction web, WIConfiguration wiConfig) {
AGEAccessMode accessMode = (AGEAccessMode)web.getSessionAttribute(SV_AGE_ACCESS_MODE);
// return isAGEIntegrationEnabled(wiConfig) ? accessMode : null;
return AGEAccessMode.EMBEDDED;
}
4. Save the file.
5. Test access to the optimized UI through Access Gateway.
More Information
CTX107804 – Access Gateway Administrator's Guide 4.2
CTX109103 – Access Gateway Advanced Edition Administrator's Guide
CTX107795 – Web Interface Administrator's Guide
CTX111709 – Web Interface Administrator's Guide
CTX113743 – Web Interface Administrator's Guide
CTX109042 – SharePoint Integration With Advanced Access Control