473,385 Members | 1,720 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,385 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.
Nov 17 '05 #1
2 911
ASP.NET has this functionality built in. It's called Forms Authentication.
It is easily configured in your web.config file.
Here's more information:
http://www.dotnetbips.com/displayarticle.aspx?id=9

You may want to combine this with your session technique you mentioned to
determine which links to make visible on your page.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Carl" <ca**@nospam.com> wrote in message
news:85****************************@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.

Nov 17 '05 #2
Have a look at
http://www.zdnet.com.au/builder/prog...35027,20274191,
00.htm

It explains how to use Forms authentication with a database, allowing you to
have an automated signup to enter user's details into a database.

Adrian

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

The thing is that these are people coming over the
Internet and are total strangers to the company.

C
-----Original Message-----
ASP.NET has this functionality built in. It's called

Forms Authentication.
It is easily configured in your web.config file.
Here's more information:
http://www.dotnetbips.com/displayarticle.aspx?id=9

You may want to combine this with your session technique

you mentioned to
determine which links to make visible on your page.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Carl" <ca**@nospam.com> wrote in message
news:85****************************@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.

.

Nov 17 '05 #3

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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.