Asp page authentication

From: William E Hatto (xxnospamxxweh_at_bigpond.net.au)
Date: 03/24/04


Date: Wed, 24 Mar 2004 22:32:42 +0800

My thanks to Nathan for the code below, but it does not work. I get the
following error;

Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
/dev/development/WAN RCI Secure/DumpSearch.asp, line 700
Function AuthCheckT

How can I get this to work?

Cheers, Bill.

Use some Javascript code to check the window.opener value. If it is
null, the window was navigated directly to. If it is not null, it will
contain a reference to the window that opened it - you code would look
something like:

<script language=javascript>

  function doLogin() {
    if (window.opener == null) {
      document.location.href = "default.asp?status=timeout";
    }
    else {
      window.opener.document.location.href =
"default.asp?status=timeout";
      window.close();
    }
  }

<%
 Function AuthCheck()
   If IsEmpty(Session("UID")) then
     Response.Write "doLogin();"
   End If
 End Function
%>

</script>

The ASP code MUST be inside the script block - the JScript function
will always be on the page, but only when the ASP checks the session
and finds nothing there is the call to the function written up to the
browser. I didn't actually test the Javascript, so it might not be
100% accurate, but you should be able to get the idea.

"William E Hatto" <xxnospamxxweh@bigpond.net.au> wrote in message
news:<e9SQ4MoDEHA.548@TK2MSFTNGP10.phx.gbl>...
> Hi 1 and all,
>
> I have an asp application/web site that uses a logon page then a page for
> the menus and separate asp pages for all the options in the menus.
>
> The options listed in the menu's spawn separate web windows leaving the
menu
> page in the background.
>
> Common to all of these pages I am using authentication. The authentication
> function is as follows;
>
> Function AuthCheck()
> If IsEmpty(Session("UID")) then
> Response.Redirect "default.asp?status=timeout"
> Response.End
> End If
> End Function
>
> My problem is when authentication is called on a spawned page it takes the
> spawned page back to logon. What I want to happen is the spawned page to
> close and the menu page return to the logon page.
>
> In the event a page is called without logging on and using the menus I
would
> like the page to revert back to the logon page.
>
> I understand it may require some 'fancy' javascript. I am using some
> javascript in my pages, but having only dabelled in it I am unable to use
it
> to the degree it may be required above.
>
> Can this be done, if so how?
>
>
> Many thanks, Bill.



Relevant Pages

  • Pls help - REMOTE_USER
    ... i'm trying to pass user's logon name to the server's ... variable REMOTE_USER but $REMOTE_USER in my asp pages ... doesn't return the correct data. ... i've selected Challenge authentication, is there ...
    (microsoft.public.inetserver.iis)
  • Re: Kerberos machine authentication - apparent authentication fail
    ... > until logon), the wireless connection can kick off when it is ready. ... > was confirmed in the server event logs with IAS (i set that up as the radius ... > as an ordinary user kicks in and takes over from the machine authentication. ... > while the network sorts itself out and a double click on a network link of ...
    (microsoft.public.windows.server.security)
  • Re: Kerberos machine authentication - apparent authentication fail
    ... as the case may be) which will delay authentication until ... I also have an Intel network adapter and WAP that does not have this> problem and even works well with 802.1X EAP-TLS for domain logon. ... In> most cases [ipsec a possible exception] kerberos authentication is not> needed to access domain resources as long as the client and server use a> common authentication method for lm/ntlm/ntlmv2. ... The main issue is to> NEVER include an ISP dns server in the preferred server list in the tcp/ip> properties or DHCP scope of any domain computer or any computer you want to> join to the domain in which case your computers may be trying to locate the> domain _srv records on the ISP dns server and fail. ...
    (microsoft.public.windows.server.security)
  • Re: Logon 529 Errors
    ... Authentication in SMTP virtual server. ... These are almost surely SMTP logon attempts, ... Caller User Name: DELLSERVER$ ...
    (microsoft.public.windows.server.sbs)
  • Re: Active Directory Logon to attribute
    ... have permission to access as you are denied to logon from this workstation... ... If accounts and machines are from abc.com they can logon to abc.com only. ... named xyz.org for the user authentication for internet. ...
    (microsoft.public.windows.server.active_directory)