Solved

Global.asa

Posted on 2002-05-28
6
313 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
6 Comments
 
LVL 19

Expert Comment

by:webwoman
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 19

Expert Comment

by:webwoman
Comment Utility
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
Comment Utility
The global.asa file is automatically created if you create a new project using Visual Interdev.
0
 

Author Comment

by:goldstar
Comment Utility
Thanks for the answer to my question.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now