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

How Do I Implement Roles For Forms-Based Authentication?

I have a web app with many users and their associated values (hashed
passwords, first name, last name, etc...) stored in a Microsoft SQL
Server 2000 database. My app uses stored procedures and forms-bases
authentication to authenticate users. Currently, in my <location> tags
in web.config, I have to manually specify user names to control access
to content. I want to learn how to implement roles to do this. I am
sure this would be a much better way.

Does anyone have any suggestions, links, etc... on what to read/study
to learn how to do this?

Thanks a bunch.

Nov 19 '05 #1
2 1247
Joey see this at:- http://aspnet.4guysfromrolla.com/articles/082703-1.aspx
Hope that helps
Patrick
"Joey" <jo*********@topscene.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have a web app with many users and their associated values (hashed
passwords, first name, last name, etc...) stored in a Microsoft SQL
Server 2000 database. My app uses stored procedures and forms-bases
authentication to authenticate users. Currently, in my <location> tags
in web.config, I have to manually specify user names to control access
to content. I want to learn how to implement roles to do this. I am
sure this would be a much better way.

Does anyone have any suggestions, links, etc... on what to read/study
to learn how to do this?

Thanks a bunch.

Nov 19 '05 #2
KMA
Patrick,

I implemented roles and it worked great for a while. I could query the roles
using IsInRole and display different page elements. Nice. Then about a month
ago it stopped working. I have to point out that my host had some kind of
server problem, the exact narute of which or what they did to fix it is not
yet known. I'm not sure if it's related or not. But now when I try to output
a list of roles for the current user I get a blank list on the host, but a
normal expected output when I host locally with identical files. The roles
are stored in a client cookie and I have tested that I read them correctly
on the host. There seems to be some problem either in creating the auth
ticket or in the IsInRole function. I read soemwhere that the function
doesn't work reliably if the the asp.net app is mapped to a UNC folder. Can
you shed any light as to:

1) if this is really true
2) how can I detect programatically if my host area is UNC or not
3) what to do about it.

Also, I have a function to send myself an email with visitor tracking
information. This is sent on session end. This has stopped working too,
although the email functionality still works because I can send myself a
test email through my "contact us" page.

I'm puzzled.

Thanks for your help.
"Patrick.O.Ige" <na********@hotmail.com> wrote in message
news:Of*************@TK2MSFTNGP10.phx.gbl...
Joey see this at:- http://aspnet.4guysfromrolla.com/articles/082703-1.aspx
Hope that helps
Patrick
"Joey" <jo*********@topscene.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have a web app with many users and their associated values (hashed
passwords, first name, last name, etc...) stored in a Microsoft SQL
Server 2000 database. My app uses stored procedures and forms-bases
authentication to authenticate users. Currently, in my <location> tags
in web.config, I have to manually specify user names to control access
to content. I want to learn how to implement roles to do this. I am
sure this would be a much better way.

Does anyone have any suggestions, links, etc... on what to read/study
to learn how to do this?

Thanks a bunch.


Nov 19 '05 #3

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

Similar topics

11
by: Gent | last post by:
I have a table named Holding_Value that has several fields in it among which are UID, fkHolding, EffDate, Units, MarketValue, AssetPrice. UID is an identity field and fkHolding is a foreign key to...
1
by: Mad Scientist Jr | last post by:
I would like to write a vb.asp.net function Private Function fn_sGetRoles(byval sDelimiter as string) As String that simply returns a delimited list of all the roles a user belongs to. I...
5
by: Jonathan Allen | last post by:
Is this the correct way to use application roles? Public Function GetDBConnection() As SqlConnection Dim oCon As New SqlConnection(myConnectionString) oCon.Open() Using oCmd As SqlCommand =...
5
by: bill | last post by:
I am looking for examples and assistance in configuring application roles using SQL Server 2000 and VB.NET, both web forms and windows forms. Are there any suggestions? Thanks Bill
9
by: Mike Hofer | last post by:
BACKGROUND: We've designed a Website for a client that will be deployed across multiple physical locations. The site will be hosted from a corporate NOC, and administered by the IT group there. ...
4
by: AC | last post by:
Hi there. My asp.net 2.0 development website uses roles to control access to sections of my site, configured using the asp.net configuration tool, which is great. Except that isn't available once...
0
by: sidhuasp | last post by:
Hi everyone I am using a mainmenu witeh sitemap provider with folowing sitemap <siteMapNode> <siteMapNode url="" title="Master Data" description="Enter Master data" roles ="Admin,PM"> ...
7
by: MyndPhlyp | last post by:
I've been combing through Google trying to find the answer but not luck. I'm using Forms authentication. Determining what Roles the current user is in was the easy part (User.IsInRole). But how...
13
by: parez | last post by:
Whats the best way of implementing authorization in a win forms application. I mean things like show/hide or enable/disable Save button ,creating context menus etc.
2
by: Nathan Sokalski | last post by:
When I call System.Web.Security.Roles.GetRolesForUser() it returns no results (an array of length 0) even though I have roles associated with the currently logged in user. I am able to get the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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: 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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.