By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,292 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,292 IT Pros & Developers. It's quick & easy.

Membership & Roles in 2.0

P: n/a
I have several questions regarding the Membership and Roles mechanism in
ASP.Net 2.0.

1. In the box, it comes with SqlMembershipProvider, which uses SQL Express
2005. What if I want it to use SQL Server 2005 Enterprise (not express)
instead? I'm really hoping I don't have to write my own MembershipProvider to
accomplish this.

2. My users have more information about them than the in the box data. For
example, I will need to know what jurisdiction a user belongs to, and of
course when they register they will pick from a list. There is much more than
that I need to store about my users that will affect their access to certain
resources (pages), etc. Gawd, I hope I don't have to write my own
MembershipProvider.

3. My last question is related to roles. I will need more information about
roles than is provided in the box. For example, a role may have to tell my
application to behave differently depending on some attribute of the role.
Jeeze, I hope I don't have to write my own MembershipProvider!

So can I do all these modifications with the "in the box" features?

--
-Demetri
May 18 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I'd suggest you review carefully, the information at this Scott Guthrie's blog entry:

http://weblogs.asp.net/scottgu/archi...24/438953.aspx

Your questions are answered in that blog entry.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Demetri" <De*****@discussions.microsoft.com> wrote in message
news:51**********************************@microsof t.com...
I have several questions regarding the Membership and Roles mechanism in
ASP.Net 2.0.

1. In the box, it comes with SqlMembershipProvider, which uses SQL Express
2005. What if I want it to use SQL Server 2005 Enterprise (not express)
instead? I'm really hoping I don't have to write my own MembershipProvider to
accomplish this.

2. My users have more information about them than the in the box data. For
example, I will need to know what jurisdiction a user belongs to, and of
course when they register they will pick from a list. There is much more than
that I need to store about my users that will affect their access to certain
resources (pages), etc. Gawd, I hope I don't have to write my own
MembershipProvider.

3. My last question is related to roles. I will need more information about
roles than is provided in the box. For example, a role may have to tell my
application to behave differently depending on some attribute of the role.
Jeeze, I hope I don't have to write my own MembershipProvider!

So can I do all these modifications with the "in the box" features?

--
-Demetri

May 18 '06 #2

P: n/a
A1.) The default SqlMembershipProvider is declared in machine.config. We
over-ride the default by declaration in web.config located in the root of
the application. Then we wire up a connection string and poof! It starts
working.

A2.) The same applies to using Profiles for persistant storage of user data
such as a jurisdiction. Profiles are implemented through Membership. The
method data is stored by default in aspnet_Profiles is not query friendly.
You're advised to study the Table Profile Provider which I've just learned
about myself.

A3.) We can create and assign a role such as A-1.0.2 and take each character
apart for introspection and applied semantics. If that's what you mean by
"attributes" applied to a role that is how I would think -- as if the name
of a role is structured like an alphanumeric part number -- but only if I
needed to forget to keep it simple stupid.

Don't fret about writing your own providers. Most of what you need to do is
read more like Juan suggested noting Gus blog contains a compendium of
related URL resources.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
"Demetri" <De*****@discussions.microsoft.com> wrote in message
news:51**********************************@microsof t.com...
I have several questions regarding the Membership and Roles mechanism in
ASP.Net 2.0.

1. In the box, it comes with SqlMembershipProvider, which uses SQL Express
2005. What if I want it to use SQL Server 2005 Enterprise (not express)
instead? I'm really hoping I don't have to write my own MembershipProvider
to
accomplish this.

2. My users have more information about them than the in the box data. For
example, I will need to know what jurisdiction a user belongs to, and of
course when they register they will pick from a list. There is much more
than
that I need to store about my users that will affect their access to
certain
resources (pages), etc. Gawd, I hope I don't have to write my own
MembershipProvider.

3. My last question is related to roles. I will need more information
about
roles than is provided in the box. For example, a role may have to tell my
application to behave differently depending on some attribute of the role.
Jeeze, I hope I don't have to write my own MembershipProvider!

So can I do all these modifications with the "in the box" features?

--
-Demetri

May 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.