Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Authorization - MySql

$
0
0

Hi all,

I'm writing my web application and I have already done the part about authentication (I'm using Simple Membership Provider and MySql as DB). The code is like that:

MySql.Web.Security.MySqlWebSecurity.InitializeDatabaseConnection("MySqlSimpleMembership", "Users", "Id", "Name", true);

in the InitializeSimpleMembershipAttribute.cs and it'all fine. I can add new user, log-on them, ecc. The SimpleMembership writes all record in its auto-created table (webpages_membership).

Now I wanna handle also roles in my application. The framework have also written in my DB  others tables (expecially one called webpages_roles).How can I write on it?

I was expecting to write something like this in my AccountController

Roles.CreateRole(...)

but since I'm using MySql I don't know what I need to do. The line of code above generates others tables on my DB (something like aspnet_....). Probably I should use some classes on  namespace MySql.Web.Security but I didn't find any documentation for that.


Viewing all articles
Browse latest Browse all 4737

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>