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

Membership & Roles in 2.0

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
2 1221
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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...
3
by: Glenn | last post by:
My current classic-ASP site has users, projects, roles and the 2.0 membership looks like a perfect fit, but I'm having trouble finding examples of how to have users that belong to different...
1
by: =?Utf-8?B?ZVByaW50?= | last post by:
Asp.Net v2.0 I have created a web application and I am using it from a single website and database. The web application has different ‘portals’ – each independent and I am using the...
2
by: DanWeaver | last post by:
I am trying to use a MySQL db hosted on a shared server as an ASP.NET Membership Provider and .net framework 3.5 (visual studio 2008) I am new to a lot of this and have found the following websites...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...

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.