Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is RoleProvider not longer available in C# Framework 4.0?

I've a Custom RoleProvider created sometime ago, and wanting to change the library to use the .NET Framework 4. Once changed, I am loosing the reference to RoleProvider class. Has something changed since 3.5 for RoleProvider? It seems to have disappeared.

Anyone know the new way to create these in C# 4.0, or do I need to revert back to C# 3.5 and rely on the v2.0 library for System.Web.Security?

Or do I now need to use SqlRoleProvider instead, even though I use a different db than SQL?

like image 989
Mark Avatar asked Jun 21 '11 14:06

Mark


1 Answers

The assembly has changed from System.Web (in System.Web.dll) (in .NET 3.5 - http://msdn.microsoft.com/en-us/library/system.web.security.roleprovider(v=VS.90).aspx) to System.Web.ApplicationServices (in System.Web.ApplicationServices.dll) (in .NET 4.0 - http://msdn.microsoft.com/en-us/library/system.web.security.roleprovider(v=VS.100).aspx)

You need to reference the new assembly.

like image 169
Stilgar Avatar answered Sep 23 '22 15:09

Stilgar