Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 26, 2012 11:01 AM by moe_caruso
Feb 26, 2012 06:49 AM|LINK
I am building a website using asp.net with an oracle 10g database,but I don't know how to implement membership and roles with this database.Is there anyway to use the asp.net membership and roles providers which are already built-in with oracle 10g database?
Please,any help would be appreciated.
Feb 26, 2012 08:09 AM|LINK
Membership and role is asp.net built in features and its almost database independent. You just needs 3~4 table in database with some defined column in the table. What you need to implement "MembershipProvider" and "RoleProvider". Also you have written the
class name and others attributes on Web.config where you implement those. One for user login and username and password and others for role.
<add name="MemberShipProvider" type="MemberShipProvider"
enablePasswordRetrieval="false" requiresQuestionAndAnswer="false" enablePasswordReset="true"/>
<roleManager enabled="true" defaultProvider="RolesProvider">
<add name="RolesProvider" type="RolesProvider"/>
On the implemented class you have to call the database table as needed.
Feb 26, 2012 08:24 AM|LINK
Hello mamun22s ,
Thanks for the help,but can you clarify more about what methods to inherit from the base class and how can that be done,or if you have any link explaining that more detailed would be appreciated.
Feb 26, 2012 08:35 AM|LINK
Sure Why not,
Step 1. Create a class which in inherit MembershipProvider
public class MemberShipProvider : MembershipProvider
Step 2. Create another class which in inherit RoleProvider
public class RolesProvider : RoleProvider
Step 3. Map that class on web.config as I mentioned before.
Step 4. Write the description of the inherited class properly on MembershipProvider and on RoleProvider
Step 5. Use VS toolbox>Login for Login page design. This Login page automatically call when the application starts up.
and also call the
MembershipProvider class>ValidateUser() method.
Hope this short description helps you.
Feb 26, 2012 11:01 AM|LINK
Yes,thank you very much.I will try that.
Thanks for the help.