473,406 Members | 2,390 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,406 software developers and data experts.

help!! credentials stored in web.config vs in database

Hi,

I have difficulties about authentication & authorization thing.
My project has an admin folder (which can only be accessed by administrator)
and a secret folder - (can be accessed by registered users).

Is it possible to store credentials in two different places and using only
one login page? (the administrator credentials in web.config file while the
registered users credentials are stored in the database).

So far, what I got working was either choose one of them: in web.config or
in the database.

I am confused how and where (which web.config, root or particular folder) to
put the authentication and authorization codes.

If it is not possible, I was thinking of having 2 login page. For registered
users and for admin. But, the problem is: it always direct me to login.aspx.
How can I direct them to adminLogin.aspx when someone try to access a file in
the admin folder?
Thanks so much...

Jul 21 '05 #1
2 1490
If i were you,

put all the login information into a database. In the table that holds
your usernames/passwords have an additional field that is marked by 0
or 1 to differetiate between admins and normal users. This gets rid of
the problem of having multiple different login pages etc..

Then in your login.aspx, once the user is authenticated, check if they
are an admin, if they are then redirect them to a different page (like
your /admin/ folder)

hope this helps.

Sean

Jul 21 '05 #2
Thanx for ur reply
"DKode":
If i were you,

put all the login information into a database. In the table that holds
your usernames/passwords have an additional field that is marked by 0
or 1 to differetiate between admins and normal users. This gets rid of
the problem of having multiple different login pages etc..

Then in your login.aspx, once the user is authenticated, check if they
are an admin, if they are then redirect them to a different page (like
your /admin/ folder)

hope this helps.

Sean

Jul 21 '05 #3

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

Similar topics

1
by: Beyonder | last post by:
I'm using InnoDB with Mysql and I've used delete to delete over 10 million records, but the InnoDB database is still the same size on the disk (over 100 gigs) is there a way to get Mysql/InnoDB to...
2
by: Gamze | last post by:
Hi, I have difficulties about authentication & authorization thing. My project has an admin folder (which can only be accessed by administrator) and a secret folder - (can be accessed by...
2
by: The Crow | last post by:
im building an online forum system. ive inspected forum.asp.net forum's and i think there is no limitation over how long a message could be. so i wonder how messages stored in database. as i know...
2
by: jerryst | last post by:
need help and advise with database... i am an independant oil and gas consultant and have a fair amount of computer experience but, am lost when it comes to data bases .... i found a database...
2
by: Dariusz Tomon | last post by:
Hello, I have to design and develop web application (ASP.NET 2.0). The main point of it will be managing documents stored into database (SQL Server 2005). Advice me please how can I do it. What...
0
sashi
by: sashi | last post by:
BLOB - Retieve image stored in database Dim CN As New ADODB.Connection Dim RS As ADODB.Recordset Dim DataFile As Integer, Fl As Long, Chunks As Integer Dim Fragment As Integer, Chunk() As...
9
by: shailajaAdiga | last post by:
Hi All.. images are stored in database(imagecontent and image type is stored).Currently i have displayed the image in popup window (no size limits to window). I would like to get the image size...
2
by: puneetmca | last post by:
hello dr.......... i m trying to store a text file into database below format of text file i hv text file like this: 0100102001110271 0409141151I1476201 0100102001110125 0409141351O1476301...
4
by: Parag Pathari | last post by:
sir i want php code for verifying password stored in database. that is when user enters username and password it should verify values stored in database. please provides php code along with html...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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,...

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.