Global ASA and request.servervariables

Results 1 to 4 of 4

Thread: Global ASA and request.servervariables

  1. #1
    Lance Guest

    Default Global ASA and request.servervariables

    Is there any way to test in the Global ASA if someone is requesting the "default page." I would like to block people from accessing pages if they have not logged into the system. I set a session variable and then test if the variable is not null.<BR>The only problem is that if they come to the site for the first time, they get sent to my error page that tells them that they have been logged out because of session timeout or have tried to access a page that is password protected. I would like to be able to send them to the default page if they were trying to get there without an error page coming up first. I have tried using the request.servervariables("url") but can&#039t get it to work correctly inside the Global ASA. Any ideas?

  2. #2
    dclark Guest

    Default RE: Global ASA and request.servervariables

    I just set up this same type of system.<BR><BR>On every ASP page in the site, at the top of the page, I test for values in the session variables: a username and password. If the session variables are null (they haven&#039t logged in, or their session was timed out) then the user is redirected to the login page. If the session variables are not null, then I run the rest of the page and close the very bottom of the page with and &#060;%end if%&#062;.<BR><BR>In my setup, I don&#039t need Global ASA. I set the session variables in the ASP that checks the login form. If the username and password are correct--checking it against a database--then the login page sets the session variables (username, password and the unique ID for that user) and redirects the user to the homepage in the site.

  3. #3
    lance Guest

    Default RE: Global ASA and request.servervariables

    Thanks, I figured that out. I did not want to have to edit every page. I was hoping it would be possible in the global asa

  4. #4
    Join Date
    Dec 1969
    Posts
    760

    Default RE: Global ASA and request.servervariables

    A workaroud.<BR>You can use response.redirect("default.asp") in the session onStart.<BR>This only triggers when the user FIRST requests an ASP page from your site.<BR>You should use Session.Abandon at the bottom of default.asp and<BR>when the login fails so that the onstart can happen again.<BR>If you need to protect html pages, you must give them them an asp extension.<BR><BR>RE:<BR>Is there any way to test in the Global ASA if someone is requesting the "default page." I would like to block people from accessing pages if they have not logged into the system. I set a session variable and then test if the variable is not null.<BR>The only problem is that if they come to the site for the first time, they get sent to my error page that tells them that they have been logged out because of session timeout or have tried to access a page that is password protected. I would like to be able to send them to the default page if they were trying to get there without an error page coming up first. I have tried using the request.servervariables("url") but can&#039t get it to work correctly inside the Global ASA. Any ideas? <BR><BR>--------------------------------------------------------------------------------<BR> <BR>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •