473,545 Members | 2,095 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Global.Asax ?

WJ
I am attempting to use the Global.Asax to store my user's configuration.
Here is the concept:

1. User logs on into the site using Form Authentication.
2. I capture the user Credential, verify it and then assign this Logon ID
(user) a so called User's serverside cookie.
3. My system is configured to accept 1,024 concurrent users, this means that
my Global.Asax will host no more than 1,024 Logon IDs and their associated
cookies/variables. IOW, cookie is uniquely identified by its Logon ID
(visitor)
4. I understand that Global.asax does not travel to client PC, therefore
there is no concern about security.

My question is: Is the Global.asax a "good" place to track user's events
from page to page and back/forth between client and server ? I try to avoid
storing user's variables inside MS/SQL Server due to performance. I also
plan a scheduled job at night to down the IIS so that all Global.asax will
be refreshed.

Thanks for your help,

John
Nov 18 '05 #1
5 3931

I think you should use Session to store user's settings.
Global.asax is readonly anyway, so you can't store anything in it.

"WJ" <Jo*******@HotM ail.Com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
I am attempting to use the Global.Asax to store my user's configuration.
Here is the concept:

1. User logs on into the site using Form Authentication.
2. I capture the user Credential, verify it and then assign this Logon ID
(user) a so called User's serverside cookie.
3. My system is configured to accept 1,024 concurrent users, this means that my Global.Asax will host no more than 1,024 Logon IDs and their associated
cookies/variables. IOW, cookie is uniquely identified by its Logon ID
(visitor)
4. I understand that Global.asax does not travel to client PC, therefore
there is no concern about security.

My question is: Is the Global.asax a "good" place to track user's events
from page to page and back/forth between client and server ? I try to avoid storing user's variables inside MS/SQL Server due to performance. I also
plan a scheduled job at night to down the IIS so that all Global.asax will
be refreshed.

Thanks for your help,

John

Nov 18 '05 #2
I agree with Oleg regarding using the Session object to store the user's
settings. If limiting the application to 1024 concurrent users is mandatory
you could have an Application variable track the number of "current" users
(the value could be incremented in Session_OnStart ()) but keep in mind that
you will need to decrement the value in the Session_OnEnd() event and also
be aware of any session timeouts that may occur and the time delay involved
with those timeouts if the user leaves the site without using some sort of
logoff mechanism to terminate the session.

You indicated concern regarding cookies with your statement that reads
"Global.asa x does not travel to client PC, therefore there is no security
concern." Global.asax is a server side script for initializing and
disposing application and session data. Global.asax has nothing to do with
or in common with cookies.

My opinion on cookies is that there is no security concern in that they do
not obtain/contain any data that was not provided to the application (ie: I
click here, it records it). Due to the nature of the applications I work on
(Supply Chain Management/Communication), I use client side cookies for
tracking user session data. Your only real alternative to this in ASP.NET
is configuring SQL Server session management (which you indicated that you
wish to avoid).

If you manage the user data properly with the Session object and the
Session_OnStart () and Session_OnEnd() events you should not have to bring
down IIS.

"Oleg Ogurok" <ol**@ogurok.co m.ihatespammers .ireallydo.co> wrote in message
news:10******** *****@corp.supe rnews.com...

I think you should use Session to store user's settings.
Global.asax is readonly anyway, so you can't store anything in it.

"WJ" <Jo*******@HotM ail.Com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
I am attempting to use the Global.Asax to store my user's configuration.
Here is the concept:

1. User logs on into the site using Form Authentication.
2. I capture the user Credential, verify it and then assign this Logon ID (user) a so called User's serverside cookie.
3. My system is configured to accept 1,024 concurrent users, this means

that
my Global.Asax will host no more than 1,024 Logon IDs and their associated cookies/variables. IOW, cookie is uniquely identified by its Logon ID
(visitor)
4. I understand that Global.asax does not travel to client PC, therefore
there is no concern about security.

My question is: Is the Global.asax a "good" place to track user's events
from page to page and back/forth between client and server ? I try to

avoid
storing user's variables inside MS/SQL Server due to performance. I also
plan a scheduled job at night to down the IIS so that all Global.asax will be refreshed.

Thanks for your help,

John


Nov 18 '05 #3
It is not possible to store anything in "global.asa x." This is a class
definition, and as such, has no capability of storing anything in it, other
than the class definition. The first step to using something effectively is
understanding what it is, and how it works.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"WJ" <Jo*******@HotM ail.Com> wrote in message
news:#s******** ******@TK2MSFTN GP12.phx.gbl...
I am attempting to use the Global.Asax to store my user's configuration.
Here is the concept:

1. User logs on into the site using Form Authentication.
2. I capture the user Credential, verify it and then assign this Logon ID
(user) a so called User's serverside cookie.
3. My system is configured to accept 1,024 concurrent users, this means that my Global.Asax will host no more than 1,024 Logon IDs and their associated
cookies/variables. IOW, cookie is uniquely identified by its Logon ID
(visitor)
4. I understand that Global.asax does not travel to client PC, therefore
there is no concern about security.

My question is: Is the Global.asax a "good" place to track user's events
from page to page and back/forth between client and server ? I try to avoid storing user's variables inside MS/SQL Server due to performance. I also
plan a scheduled job at night to down the IIS so that all Global.asax will
be refreshed.

Thanks for your help,

John

Nov 18 '05 #4
Let me be a little more helpful here. global.asax is a class definition. The
global class is created at Application start-up, and it has a number of
event handlers (functions that respond to events) which can be defined in
it. As it is a class definition, you can also create additional fields and
properties which are static, and can be accessed by any page in the
application if you wish, although one should be careful of using static
fields, properties, and methods, by understanding what the implications of
such are (e.g. locking static variables when changing because they are not
thread-safe). In the global.asax class definition you can implement code in
the various event handlers that can store data in Application State, Session
State, data store, etc. These other classes exist in various scopes and at
various times. In addition, you have other opportunities to store data in
server-side memory, data store, or on the client, in the form of Cookies.

It may seem like I'm being picky here, but again, understanding what
something is, and how it works, is the key to being able to answer these
types of questions for yourself, which will speed up your programming
tremendously. Often, what seems like a "waste of time" in the short run,
saves you much more time in the long run, and that is what I'm trying to
help you to do.

To find out more about the global.asax class, you can visit:

http://msdn.microsoft.com/library/de...alasaxfile.asp

In addition, the entire Microsoft .Net SDK can be freely downloaded from:

http://www.microsoft.com/downloads/d...displaylang=en

I read it every day!

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"WJ" <Jo*******@HotM ail.Com> wrote in message
news:#s******** ******@TK2MSFTN GP12.phx.gbl...
I am attempting to use the Global.Asax to store my user's configuration.
Here is the concept:

1. User logs on into the site using Form Authentication.
2. I capture the user Credential, verify it and then assign this Logon ID
(user) a so called User's serverside cookie.
3. My system is configured to accept 1,024 concurrent users, this means that my Global.Asax will host no more than 1,024 Logon IDs and their associated
cookies/variables. IOW, cookie is uniquely identified by its Logon ID
(visitor)
4. I understand that Global.asax does not travel to client PC, therefore
there is no concern about security.

My question is: Is the Global.asax a "good" place to track user's events
from page to page and back/forth between client and server ? I try to avoid storing user's variables inside MS/SQL Server due to performance. I also
plan a scheduled job at night to down the IIS so that all Global.asax will
be refreshed.

Thanks for your help,

John

Nov 18 '05 #5
WJ
Thanks EijiTek for your very good comment. I think cookies is ruled out in
my case, I will have to think more of database storage solution on certain
conditions applied to my applications.

John
Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
3743
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to manipulate them. It starts > and ends with <script></script> tags. > > Yours looks like a compiled version of it.
12
3800
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it (the oleDBConnection on global.asa.vb) at the other aspx pages ?
8
4849
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical differences in the way both the objects are handled by IIS. Are both objects stored in different memory spaces? I can access both the objects in my web...
5
15007
by: ad | last post by:
The Global.asax is code-inside with default. How to change Global.asax to code-behind?
2
3693
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How do I ensure that changes made to the "Global.asax.vb" file are immediately reflected in the "Global.asax" file? After I change to the...
11
8331
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the generated code on a W2K3 server the application_start and any other event on the global.asax file won't fire. I added tracing and logging to make sure...
4
3022
by: Al Santino | last post by:
Hello, I've created a simple C# web services project using Visual Studio 2005. My service compiles and runs correctly when called by remote clients. I'm able to step through the service in the debugger unless I add a Global.asax file. When I do that and then try to run the debugger I receive error 403. If I remove the Global.asax file...
16
5017
by: thefritz_j | last post by:
We just converted our VS2003 1.1 VB web project (which was working fine) to VS2005 2.0 and now I get: Parser Error Message: Could not load type '<Namespace>.'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="<Namespace>." %> I've done a lot of things I've found on the web to no avial, but here are some...
8
13180
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project compiles & runs fine locally, but when I copy to the production machine, I get this error: Parser Error Message: Could not load type 'Global'....
15
2534
by: =?Utf-8?B?UGF0Qg==?= | last post by:
Just starting to move to ASP.NET 2.0 and having trouble with the Global.asax code file. In 1.1 I could have a code behind file for the global.asax file. This allow for shared variables of the Global class. Note: I use these shared variables for read only values that are set at application start. It would appear the 2.0 doesn't like you...
0
7464
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7396
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7413
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4943
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1874
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.