473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Session Variables in .NET

Hi,

I am starting to develop an ASP.Net application.

I will have a logon page which will take a UserName and
Password. A Stored Procedure will verify that the logon
is correct.

I was going to use a Session Variable to indicate whether
the user is logged on or not. Based on this variable I
would show certain links, allow access to certain pages.

Is this a good idea or is there a better way?

Thanks.
Carl.
Jul 19 '05 #1
4 2432
Go here http://www.asp.net/Tutorials/quickstart.aspx and check the
Forms-Based Authentication section. Some of the job is already done for you,
using cookies and encryption. There is also a smple for the login. Good
luck.

"Carl" <ca**@nospam.com> wrote in message
news:03****************************@phx.gbl...
Hi,

I am starting to develop an ASP.Net application.

I will have a logon page which will take a UserName and
Password. A Stored Procedure will verify that the logon
is correct.

I was going to use a Session Variable to indicate whether
the user is logged on or not. Based on this variable I
would show certain links, allow access to certain pages.

Is this a good idea or is there a better way?

Thanks.
Carl.

Jul 19 '05 #2
Thanks for that abacnet.

Thing is that the app will be accessed over the Internet
by strangers who can create an account and login.

So I gues s all I can use is a Session to indicate if
they have logged in or not.

Carl.
-----Original Message-----
Go here http://www.asp.net/Tutorials/quickstart.aspx and check theForms-Based Authentication section. Some of the job is already done for you,using cookies and encryption. There is also a smple for the login. Goodluck.

"Carl" <ca**@nospam.com> wrote in message
news:03****************************@phx.gbl...
Hi,

I am starting to develop an ASP.Net application.

I will have a logon page which will take a UserName and
Password. A Stored Procedure will verify that the logon
is correct.

I was going to use a Session Variable to indicate whether the user is logged on or not. Based on this variable I
would show certain links, allow access to certain pages.
Is this a good idea or is there a better way?

Thanks.
Carl.

.

Jul 19 '05 #3
I don't see the problem, that's what the cookie is all about. And anyhow I
think the session uses cookies indirectly.

"Carl" <ca**@nospam.com> wrote in message
news:04****************************@phx.gbl...
Thanks for that abacnet.

Thing is that the app will be accessed over the Internet
by strangers who can create an account and login.

So I gues s all I can use is a Session to indicate if
they have logged in or not.

Carl.
-----Original Message-----
Go here http://www.asp.net/Tutorials/quickstart.aspx and

check the
Forms-Based Authentication section. Some of the job is

already done for you,
using cookies and encryption. There is also a smple for

the login. Good
luck.

"Carl" <ca**@nospam.com> wrote in message
news:03****************************@phx.gbl...
Hi,

I am starting to develop an ASP.Net application.

I will have a logon page which will take a UserName and
Password. A Stored Procedure will verify that the logon
is correct.

I was going to use a Session Variable to indicate whether the user is logged on or not. Based on this variable I
would show certain links, allow access to certain pages.
Is this a good idea or is there a better way?

Thanks.
Carl.

.

Jul 19 '05 #4
Check this site if you have some time
http://msdn.microsoft.com/library/de...secnetch08.asp

"Carl" <ca**@nospam.com> wrote in message
news:04****************************@phx.gbl...
Thanks for that abacnet.

Thing is that the app will be accessed over the Internet
by strangers who can create an account and login.

So I gues s all I can use is a Session to indicate if
they have logged in or not.

Carl.
-----Original Message-----
Go here http://www.asp.net/Tutorials/quickstart.aspx and

check the
Forms-Based Authentication section. Some of the job is

already done for you,
using cookies and encryption. There is also a smple for

the login. Good
luck.

"Carl" <ca**@nospam.com> wrote in message
news:03****************************@phx.gbl...
Hi,

I am starting to develop an ASP.Net application.

I will have a logon page which will take a UserName and
Password. A Stored Procedure will verify that the logon
is correct.

I was going to use a Session Variable to indicate whether the user is logged on or not. Based on this variable I
would show certain links, allow access to certain pages.
Is this a good idea or is there a better way?

Thanks.
Carl.

.

Jul 19 '05 #5

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

Similar topics

6
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
6
by: Lina Manjarres | last post by:
Hello, I have a session variable in a login page. Then I go to a form page where I uses the ProfileID and the UserID. Then I go to a result page where I would like to use the UserID as a filter,...
4
by: PJ | last post by:
A particular page seems to be having issues with correctly setting Session variables. I am setting a couple of session variables on the Page_Unload event. While stepping through code, the...
31
by: Harry Simpson | last post by:
I've come from the old ASP camp where session variables were not used. When i started using ASP.NET in 2001, I started using them again because it was ok from what I'd read. I've been merrily...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
3
by: Alan Wang | last post by:
Hi there, Once my application gets complicated and complicated. I found it's really hard to keep track of Session value I am using in my asp.net application. I am just wondering if anyone have...
3
by: Phillip N Rounds | last post by:
I'm writing a user control which has two states: Active & InActive. I additionally am required that there to be only one active control per page, and all logic has to be contained within the...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
26
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user...
12
by: MrHelpMe | last post by:
Hello again all, I've finished my whole application and now I don't like the whole session variables that I am using. I have a form, user fills in info clicks submit and using CDOSYSMail an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.