473,321 Members | 1,669 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,321 software developers and data experts.

About ASP.NET (v2) Authentication...

Hello,

I use ASP.NET v2. But i think it's the same (if it is..)
for 1.1!
So, i wanna know if it's possible (like php) to use
sessions AND/OR cookies authentication but not 1 or 0, not
show the page or go login.aspx.
I want to have a page with design and others things and put
this code (like PHP):

if( user authed (cookies, sessions))
{
show "You are authed, click here to play"
}
else
{
show "You are not authed, please login! Click here"
}

But not: if(logged) {show all} else {go(login.aspx)}...

If i use the system with Web.config it's 1 or 0 so it's not
what i want.
What i want : depending on the state of the visitor, show a
different code but in the same page!

Regards.
Nov 18 '05 #1
1 997
"Mr.KisS" <an*******@discussions.microsoft.com> wrote in message
news:29*****************************@phx.gbl...
Hello,

I use ASP.NET v2. But i think it's the same (if it is..)
for 1.1!
So, i wanna know if it's possible (like php) to use
sessions AND/OR cookies authentication but not 1 or 0, not
show the page or go login.aspx.
I want to have a page with design and others things and put
this code (like PHP):

if( user authed (cookies, sessions))
{
show "You are authed, click here to play"
}
else
{
show "You are not authed, please login! Click here"
}

But not: if(logged) {show all} else {go(login.aspx)}...

If i use the system with Web.config it's 1 or 0 so it's not
what i want.
What i want : depending on the state of the visitor, show a
different code but in the same page!


Request.IsAuthenticated will tell you whether the current request is
authenticated. If you use roles-based security, you can also use things like
User.IsInRole("Admin"). See
HOW TO: Implement Role-Based Security with Forms-Based Authentication in
Your ASP.NET Application by Using Visual Basic .NET
(http://support.microsoft.com/default...b;en-us;306238)
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2

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

Similar topics

21
by: JustSomeGuy | last post by:
When you iterate through a list of objects in a list. list<object> mylist; list<object>::const_iterator iter; object ob; for (iter=mylist.begin(); iter != mylist.end(); ++iter) { ob =...
5
by: RedEye | last post by:
Hello, I am working on a test site to explore the new login controls and membership features of ASP.NET v2.0. I have tested the controls using SQL Express and have now decided to try using a...
2
by: Mark Rae | last post by:
Hi, I have a fairly simple site, the vast majority of which is available to everyone on the public internet. However, the site has one section which requires logon via the standard...
0
by: Gery D. Dorazio | last post by:
The SQL Server 2005 security database that is installed for an ASP.NET V2.0 web app has the UserName and LoweredUserName in the aspnet_User table. It appears that the only way the UserName is set...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.