 <p>You should handle this in the global.asax (HttpApplication class file) - specifically like so:</p> <p>c#</p> <pre><code>void Application_OnAuthenticateRequest(Object Source, EventArgs Details) { // Authentication code goes here. //if fail, Response.Redirect('NotAuthenticated.htm'); //or like so. } </code></pre> <p>VB</p> <pre><code> Sub Application_OnAuthenticateRequest(Source As Object, Details as EventArgs) 'Authentication code goes here. End Sub </code></pre>