New In Programming
New In Programming

Reputation: 90

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.

Upvotes: 2

Views: 4735

Answers (2)

Win
Win

Reputation: 62290

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.

enter image description here

enter image description here

More Resources for Identity in WebForm

Upvotes: 2

Lyubomir Velchev
Lyubomir Velchev

Reputation: 962

Check the Aspnet_regsql.exe tool also that article will be helpful for you http://www.asp.net/web-forms/overview/older-versions-security/membership/creating-the-membership-schema-in-sql-server-cs

Upvotes: 0

Related Questions