HOME     NEWS     TESTIMONIALS     CONTACT
leederbyshire.com OWA FOR PDA     OWA FOR WAP     BUY ONLINE     DOWNLOADS

FAQ

RSS

MSExchange.org Reader's choice OWA Addons 1st runner-up

Microsoft MVP

OISV

ShareIt!

Remembering the Login Name with MS Outlook Web Access 2003 and Forms-based Authentication

Back to Articles page

Here I will describe how you can persuade the FBA logon page to remember the last-used login name. Please note, however, that the last-used username will be stored in a cookie at the client end. No passwords are stored, of course.

First, use Notepad to create a file named OWALogonID.asp in the root of your Default Web Site. Here are the contents of the file:

  <%
  s = Request.ServerVariables("HTTP_REFERER")
  If Right(UCase(s), 12) = "/?CMD=NAVBAR" Then
    p = InstrRev(s, "/")
    p2 = InstrRev(s, "/", p - 1) + 1
    s2 = Mid(s, p2, p - p2)
    Response.Cookies("LogonID").Item = s2
    Response.Cookies("LogonID").Expires = Now + 28
  End If
  %>

Then, in IIS Manager, view the permissions on the OWALogonID.asp file. Ensure that Anonymous Authentication is enabled.

Next, locate a file named vw_Navbar.js . At the time of writing, it is located in C:\Program Files\Exchsrvr\exchweb\6.5.7651.60\controls , although with future service packs and updates, that last folder name will be higher. The vw_Navbar.js file is the one that needs editing, so before doing anything else, copy and paste a backup copy into the same folder. Next, open the file in Notepad (you can probably do this with right-click -> Edit). About 226 lines into the file, there is a line that looks like this:

  function window.onload()

Immediately after the opening brace { on the next line insert the following text:

  var o = new ActiveXObject("Microsoft.XMLHTTP");
  o.open("GET", "/OWALogonID.asp", false);
  o.send();

So that that part of the file looks something like this:

  function window.onload()
  {
  var o = new ActiveXObject("Microsoft.XMLHTTP");
  o.open("GET", "/OWALogonID.asp", false);
  o.send();

        if (!g_sBase) return(false);

Next, locate your FBA logon page, this will be in C:\Program Files\Exchsrvr\exchweb\bin\auth\<YourLanguage> . Make a backup copy of the Logon.asp file, then open it in Notepad. Press CTRL-F to find the text id="username". You should find it in an input control beginning like this:

<INPUT type="text" id="username" name="username" ...

add a value field to it, like this:

<INPUT value="<% = Request.Cookies("LogonID").Item %>" type="text" ...

and save the file.

Now, when your clients next access OWA, their usernames should be remembered by the FBA logon page.

Note - your clients will need to clear their Temporary Internet Files before this will work because the original .js file is usually cached client-side. Also, this will only work for the full JavaScript-enabled 'Premium' OWA client - it will not work for clients using non-MS browsers, or FBA with the 'Basic' client selected.

Copyright © 2003 - 2010 Lee Derbyshire. All rights reserved.