NFuse Logon Walkthrough
Before looking more closely at modifications that can be made to an NFuse Web site, it is helpful to understand exactly how the various NFuse components interact, specifically the ASP scripts and Java objects on the Web server. With this understanding, it is usually much easier to make the necessary changes to configure the environment to behave exactly as you desire.
If you look in the subdirectory created by running the Web Site Wizard, you will find a number of HTML and ASP scripts. All of these work together to provide the NFuse interface to the user. For example, a user connecting to my generated Web site would proceed through the following steps:
The user points a browser to my NFuse Web site.
The user then receives default.htm, which performs ICA client detection and provides the option to perform the appropriate client installation, if necessary. At the same time, the login.htm file is requested from the server.
The login.htm file is returned, and the logon page appears, prompting the user to enter ID, password, and domain.
When the user clicks the Login button, the information entered is posted to the applist_nfuse.asp script.
The applist_nfuse.asp script writes the entered information into a set of cookies before loading applist.asp.
Applist.asp retrieves the user information from the cookies and passes this information via the NFuse objects to the server farm for authentication. If the logon is valid, this script then proceeds to generate the appropriate HTML file based on the list of published applications assigned to the user. The resulting file is returned to the client.
When the user clicks on an application link, this initiates launch.asp, which generates and returns the appropriate ICA file for the application.
- The ICA file is automatically associated with the Citrix ICA client on the user's local desktop, which reads the file and connects to the appropriate published application on the MetaFrame server.
With this in mind, I will now take a brief look at each of the individual components.
location = login.htm;
As you might expect, that line will open the login.htm page.
This is really nothing more than a simple HTML form that will post the user's input to the applist_nfuse.asp script when the user clicks the Login button.
This is the first HTML page that actually makes use of the NFuse Java objects. The function of this script is to take the user ID, domain name, and password posted to it; verify that both the domain and user ID are not blank; and then write this information into NfuseData cookies. When this is done, it loads the applist.asp script. If any data is missing (ID or domain), it will simply reload the login.htm page.
This script forms the bulk of the user's NFuse session. First, it loads the user data from the NfuseData cookies (created in applist_nfuse.asp), and in turn uses this to initialize a CitrixWireGateway object. This object is used to establish a connection between the Web server and the XML Service on a MetaFrame server. The default MetaFrame server used is the one that you specified during the Citrix Java Objects installation.
When the connection has been established, the published application list corresponding to the user is requested from the XML Service. If a valid list is returned, then the script will proceed to enumerate all the folders and applications that were returned, building the user's HTML application page. For each published application, this script creates a link that will call the launch.asp script, passing it the application name and the MIME extension type.
As the name suggests, launch.asp is responsible for generating the appropriate ICA file for the requested published application. The actual file generation is done using the TemplateParser Java object. One of the main responsibilities of this object is to perform tag substitution on the template.ica file. A sample template.ica file looks as follows:
<[NFuse_setSessionField NFuse_ContentType=application/x-ica]> <[NFuse_setSessionField NFuse_WindowType=seamless]> [WFClient] Version=2 ClientName=[NFuse_ClientName] [ApplicationServers] [NFuse_AppFriendlyName]= [[NFuse_AppFriendlyName]] Address=[NFuse_IPV4Address] InitialProgram=#[NFuse_AppName] DesiredColor=[NFuse_WindowColors] TransportDriver=TCP/IP WinStationDriver=ICA 3.0 <[NFuse_IFSESSIONFIELD sessionfield="NFUSE_ENCRYPTIONLEVEL" value="basic"]> Username=[NFuse_User] Domain=[NFuse_Domain] Password=[NFuse_PasswordScrambled] <[/NFuse_IFSESSIONFIELD]> <[NFuse_IFSESSIONFIELD sessionfield="NFUSE_SOUNDTYPE" value="basic"]> ClientAudio=On <[/NFuse_IFSESSIONFIELD]> [NFuse_IcaWindow] [NFuse_IcaEncryption] [EncRC5-0] DriverNameWin16=pdc0w.dll DriverNameWin32=pdc0n.dll [EncRC5-40] DriverNameWin16=pdc40w.dll DriverNameWin32=pdc40n.dll [EncRC5-56] DriverNameWin16=pdc56w.dll DriverNameWin32=pdc56n.dll [EncRC5-128] DriverNameWin16=pdc128w.dll DriverNameWin32=pdc128n.dll [Compress] DriverNameWin16=pdcompw.dll DriverNameWin32=pdcompn.dll
Any of the text beginning with <[NFuse_ or [NFuse_ represents a substitution tag that the TemplateParser will replace with the actual data that was collected for the current user. Tag substitution is completed before the file is returned to the user's browser for processing. A thorough discussion on substitution tags can be found in the NFuse 1.5 Administrator's Guide in the "Using NFuse Tags" section.