How Do I Implement Roles For Forms-Based Authentication?

J

Joey

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.
 
K

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top