Solved

Global.asa

Posted on 2002-05-28
6
332 Views
Last Modified: 2013-12-24
It's gotta be a dumb question -

How do I create the global.asa file?

What are the required values?

Any good reading on global.asa?
0
Comment
Question by:goldstar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 7039539
You don't need to create one. The only use is if you're custom coding ASP pages and know EXACTLY what you're doing. I've got lots of ASP pages, database connections, includes, forms, etc. and I don't have one. Everything works just fine without it.

Sometimes FP will create one if it needs it. If it doesn't make one, you don't need it. ;-)
0
 
LVL 10

Expert Comment

by:KenAdney
ID: 7040507
webwoman is, as alway, correct.  There's some more info about the content/purpose of the file at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/html/psdk/asp/glob63vp.asp
0
 

Author Comment

by:goldstar
ID: 7041719
I have a series of pages (all within a virtual directory) that can be accessed only with a userid & password.  

My intent is to store a variable after the user has successfully logged in from the login page.  

I want to check for this variable on all pages witin the virtual directory to prevent access from a bookkmarked page.

Is the global.asa needed for this?

If not, could you give an example of what the "check for status of variable would like?  I've been trying this on the pages:

if session("logged_in") <> "Y" then
     response.redirect "//http:999.9.9.99/login.asp"
end if

and this is on the authentication page:
<%
dim x
x = Request.ServerVariables("HTTP_REFERER")
if x = "http://999.9.9.999/authenticated.asp" then
     session("logged_in") = "Yes"
     'response.write "Session: " + session("logged_in")
else
     session("logged_in") = "No"
     response.redirect "http://158.6.1.76/login.asp"
end if
%>

But the variable does not get passed.  That is why is thought about the asa file.

0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 19

Expert Comment

by:webwoman
ID: 7043260
Set a cookie... but you have to do it BEFORE you write any HTML content.

You're checking the wrong thing. If you want to check the referring document URL, you can use javascript -- document.referrer does exactly that. If you want to set something for the client, a cookie is easier. You can do a session variable as well, which is basically a cookie stored on the server.

You do that on the first page. On the first and the other pages, you check to see if the cookie exists, and if the login value is 'logged in' (for example). If it does, they're logged in. If it doesn't, they're not. You can then redirect from there.

I'd have to look up the proper syntax, but any good ASP tutorial site should have it. Check www.asp101.com -- they usually have good tutorials.
0
 
LVL 1

Accepted Solution

by:
choroque earned 50 total points
ID: 7048357
The global.asa file is automatically created if you create a new project using Visual Interdev.
0
 

Author Comment

by:goldstar
ID: 7050906
Thanks for the answer to my question.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question