Solved

Global.asa

Posted on 2002-05-28
6
316 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
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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 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 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…

911 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

24 Experts available now in Live!

Get 1:1 Help Now