PC Review


Reply
Thread Tools Rate Thread

How do I do key based Authentication in C#

 
 
Fresh Air Rider
Guest
Posts: n/a
 
      17th Feb 2004
I used to write websites in classic ASP which authenticated a user and
retrieved a comma separated list of "keys" via a COALESCE query from a
SQL Server database which determined which areas of the site they
could access.

The list was stored in a session variable and could be something like
"news,stocks,charts,reports".

Then for instance, at the top of the "Stocks.asp" page, there would be
a line of code which did a simple string search on the session
variable to see if the "stocks" "key" or word was present and either
let the user view the page or redirect them somewhere else such as a
login page.

Could anyone please explain how I could implement this in C# ?

I have just mastered Forms-Based Authentication using the Web.Config
file to denote which pages are effectively private and public which is
working fine but this is not specific to each user.

<location path="default1.aspx">
<system.web>
<authorization>
<allow users ="*" />
</authorization>
</system.web>
</location>

I basically need to authenticate users and only allow them access to a
page if they possess the necessary key which has been associated with
their user record in the SQL Server database.

Would this need to be a modification of Forms-Based Authentication or
something completely different ?

I would be extremely grateful for any advice or a URL of an article
which explains how to do this.

Regards
John Smith
 
Reply With Quote
 
 
 
 
Fresh Air Rider
Guest
Posts: n/a
 
      20th Feb 2004
Hi

Has anyone got any suggestions for this one yet. I think it's the sort
of problem that many programmers will get at sometime.

Jihn
 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      21st Feb 2004
Hi Fresh Air Rider,

We see you get no answer here, did you already try it in the newsgroup

microsoft.public.dotnet.aspnet

I hope you find your answer,

Cor


 
Reply With Quote
 
Fresh Air Rider
Guest
Posts: n/a
 
      21st Feb 2004
Hi Cor

Thanks for that.

I actually got a reply here http://tinyurl.com/2agjd

Thanks
John
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help for .net form-based authentication =?Utf-8?B?U3dvcmQ=?= Microsoft ASP .NET 0 19th Aug 2005 01:46 PM
Forms-Based Authentication BillGatesFan Microsoft ASP .NET 2 30th Dec 2004 03:58 AM
Form-based Authentication =?Utf-8?B?QXNpbQ==?= Microsoft ASP .NET 2 17th Dec 2004 06:15 PM
form based authentication. Rudy Mark Microsoft ASP .NET 2 16th Oct 2003 07:54 PM
Directory based authentication Saravana Microsoft ASP .NET 10 27th Aug 2003 10:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:43 PM.