I had a customer ask me and Pete if it is possible to save user session data as cookies? They asked because with cookies users would be able to “save” their preferred domain. For this particular customer, they have the problem where users from many domains are all using one single web interface. Therefore for many of the users, the default domain name that comes up doesn’t match their default and can cause user confusion. Even if you fix the problem with a support call, if the user doesn’t login frequently, they may forget the simple fix of typing in or selecting your domain name. Enabling cookies to store this data can solve the problem.

Our super cool PM, Al Grandville, got this answer from engineering. You can achieve what you want (remember a user’s domain each time they log in) by making a simple customisation to WI. It only works for WI 4.5 and above. We disable the functionality by default for security reasons, but with a code tweak you can turn it back on. Here’s what you need to do:

  • Find the “login.aspxf” or “LoginASP.cs” file within the WI site (depends on your version). It should be located at (for example) C:\inetpub\wwwroot\Citrix\AccessPlatform\app_data\auth\serverscripts\login.aspxf           -or-C:\inetpub\wwwroot\Citrix\AccessPlatform\app_code\PagesCs\pages\auth\LoginASP.cs
  • Open the file in any text editor
  • Locate line 513 in the LoginASP.cs file or about line 200 in the login.aspxf file --  this is what we call a “customization point” in WI, which is a portion of code that is highlighted as an area that customers will want to modify. The customization point includes some instructions on how to comment out the existing line of code and replace it with another that will provide the “remember domain” functionality.
  • Follow the instructions and save the file to update the site.

Enjoy! Thanks to the Michael Bednarek, Al Grandville and the Web Interface Dev team.