简体   繁体   中英

how to add roles to asp.net when you have webforms

I am beginner in ASP.NET, and I need help to create user roles and identity. Until now, I have create few Webforms (Registration page, Login page...) but I don't know how to manage user roles. I want to bind users with roles, and identities. I saw few examples how to do it, but it didn't work for me. Thank you in advance for help.

I have just tried to enable asp.net configuration option in VS 2013 (as it is described here http://alireza-afshar.com/wordpress/?p=74 ) but I got error message:

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. The following message may help in diagnosing the problem: Access to the path 'C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Temporary ASP.NET Files\\root\\0d4c4367\\763dc453\\hash' is denied.

Could please someone help me with this? Thank you in advance.

ASP.Net comes with Membership Provider since .Net 2.0, so you do not have to reinvent the wheel.

The latest version is called ASP.NET Identity . You can look at it by creating a new Web Forms application.

在此处输入图片说明

在此处输入图片说明

More Resources for Identity in WebForm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM