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

How to implement Roles in ASP.NET Identity 2.1 in Webforms

$
0
0

Hi,

I'm extremely frustrated and I could really use some help.  I have an ASP.NET 4.5 webforms project that's using Identity version 2.1 - and I just want to add roles to it.  I've searched and searched on it and read post after post on how to implement it, only to be lead down one rabbit hole after another.  It seems next to impossible to find examples that aren't MVC.  Every code example leaves me with new errors and new problems with the old ones remaining.  

The last code example I tried leaves VS complaining with the following errors: 

The type or namespace name 'RoleProvider' could not be found (are you missing a using directive or an assembly reference?)

The type or namespace name 'CustomRole' could not be found (are you missing a using directive or an assembly reference?)

I just want to get this to work.  Isn't there a simple A-to-B-to-C-to-D tutorial out there to show how to implement this?  This is so absolutely frustrating.  

If anyone can help me with my problem I would really appreciate it. 

<rant> New versions of things are supposed to make things more powerful and life easier, not make a developer have to spend countless hours fighting with a new authentication system, struggling with broken NuGet references, or reading a dozen tutorials for ASP.NET that turn out to be for MVC because Microsoft in their infinite wisdom introduced a different platform but gave it the same name as another platform.  It really seems like ASP.NET Identity and NuGet weren't ready for primetime and were just thrown out, consequently throwing developers under the bus and making the ASP.NET platform a pain to develop and maintain - not to mention very expensive for any company using it since they have to pay their developers to try to hunt down solutions to these new problems that didn't exist in the old versions.  </rant>


Viewing all articles
Browse latest Browse all 4737

Trending Articles



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