leederbyshire.com  Mobile web applications for Microsoft Exchange Server.

OWA Time Limit Exchange 2007

Microsoft Outlook Web Access 2007 Logon Time Restriction or Time Limit

Back to Articles page

An interesting question came up in one of the MSExchange.org forums recently. A guy simply wanted to limit the times that OWA 2007 was available to his users. There's no built-in way to do this, but I was able to suggest a fairly simple modification to the FBA logon page (this won't work if you don't have FBA enabled).

First, look for the logon.aspx file in the C:\Program Files\Microsoft\Exchange Server\ClientAccess\Owa\auth folder. Make a copy of it (important if something goes wrong), and then open it in Notepad. Look near the beginning for a line like this:

    <% if (!ReplaceCurrent) { %>
Just before it, insert the following code:
    int h = DateTime.Now.Hour;
    if(h < 9 || h > 17)
      Response.Write("Sorry, OWA is only available between 09:00 and 18:00");

This will prevent anyone logging into OWA outside the hours of 09:00 and 18:00. Unfortunately, it won't kick out anyone who is already logged in; but maybe one day I'll look at the Default.aspx file, and see if something can be added there.

As with most of these type of modifications, you will need to check that they still function after each product update. Sometimes your modified file will be replaced by a new one from the update.

Outlook Web App For Nexus
Copyright © 2018 Lee Derbyshire. All rights reserved.