Is there a way to User.GetAllRoles?

I know I can do User.IsInRole() to check for a role, but can I get the string array of Roles back out somehow?

John
http://www.freetextbox.com/
0
revjon
7/31/2003 8:04:52 PM
asp.net.security 27051 articles. 1 followers. Follow

2 Replies
1046 Views

Similar Articles

[PageSpeed] 6
Get it on Google Play
Get it on Apple App Store

Sort answer...no...long answer, you have to create a custom IPrincipal - best thing I can do is point you to this post:

http://www.dotnet247.com/247reference/msgs/23/116697.aspx
0
Scott
8/1/2003 11:58:21 AM
Scott,

thanks a ton. that was perfect!
John
http://www.freetextbox.com/
0
revjon
8/1/2003 2:54:48 PM
Reply:

Similar Artilces:

Is there a better way to authenticate users and secure the website?
Hi, I have a secure download site and people can't browse it on the browser if they go to our main download site directory, it will show on the page "the website declined to show this webpage" and this is what we want it. I have a client who has a program that could send the request string to our download site (download handler) through the http query string with username, password and filename that they want to download from our web site.  After the download handler validates a username and password, then it will give them the file's link to download a...

Net users responsible for security, industry reps say
Net users responsible for security, industry reps say http://www.infoworld.com/article/05/02/04/HNnetsecurity_1.html *********************************************************** Quote *********************************************************** Author: Joris Evers Date: February 04, 2005 In the battle against online scams, consumers have a responsibility to use the tools provided by technology vendors to protect their personal data and privacy, executives from eBay, Hewlett-Packard, Microsoft, and Truste said Thursday. Phishing schemes are prevalent and eBay users are regular...

Security
Hi, I have set up the membership and roles provider with Active directory and SQL server respectively, and everything was fine. However I am having this problem in the ASP.NET web Adminstration Tool when I go to Manage Users, and try to edit and save a users Email/Description, it returns an error saying: Please correct the errors below. Type 'System.Security.Principal.SecurityIdentifier' in assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. Yet, I do not have any problem with updating the roles database. A search on ...

An interesting new way of securely sharing data with many users
http://news.bbc.co.uk/1/hi/technology/7409303.stm Amid Sahai, associate professor at UCLA, told BBC World Service's Digital Planet programme that they had decided to "rebuild the idea from the ground up," and developed the idea of multiple keys giving access to selected pieces of data. "In our vision, we'll have some data that can be locked - but now that one lock is openable by many different keys in many different ways," he explained. [for the unabridged version, see sparky's post above] > http://news.bbc.co.uk/1/hi/technology/7409303.s...

Security Policy setting for ASPNet user in .Net 1.1
How would I change the security policy in web.config file for ASPNet user in .Net Framework 1.1, so that this user has the right to create a custom event log and also custom event log sources? This would allow creation of custom event logs in a dynamic manner through .Net code. Normally, only an admin user can create new custom event logs on a machine and if you try to create a custom log or source in code using methods in EventLog class, then the method fails because the ASPNet user under whom the code is executing does not have permission to create the event log.    s...

Lost user passwords with .Net security and SQL 2005 Express
Hi, I'm starting to use .net with web developer. I created a portal with .net security using sql 2005 express.  I can create a user and get loged in automatically into the web site but when I logout, then I can't login again. It always says that the login is incorrect. I checked that the user exists with the Website Configuration Tool. I'm also able to ask for a forgotten password and then I get a new password by e-mail. But the new password won't work either. It seems as if the system would't keep the passwords correctly in the database or it didn't receive the passwords correctly f...

Has the way user controls created changed w/ .NET 2.0?
Hi, I'm a little behind in switching to .NET 2.0. We recently converted an ASP.NET 1.1 application to .NET 2.0. Now, I'm having trouble creating user controls. I have a folder called UserControls under the root. I always created sub folders under this folder and placed my ascx files w/ code behind in there. Whenever I wanted to use a user control in an aspx page, I'd declare it in the aspx page by using <%@ Register and declare it in the code behind as: protected MyApplication.UserControls.SubFolderName.UserControlName us1; Since the conversion to .NET 2.0, I've create...

any way to convert an existing application to .net 2.0 AND Add security features?
Hi, We're about to start building a 2.0 version of our current product, and we're wondering if anyone out there has been able to take an existing system that has a user table, such as ours does, and convert it to the new security features of .NET 2.0.  Currently our primary key for users (IdUser) is a foreign key table all over the database (300+ tables).  I'm wondering if I'd just have to map the current user id to the new user id, and then change all of the fk relationships back to the new 2.0 asp.net generated table, or whether there's a simpler way...   Thanks, -A-Adam...

Unable to cast object of type 'WIM2008_Web.App_Code.wim.security.data.User' to type 'WIM2008_Web.App_Code.wim.security.data.User'
I don't know if i post this in the rigth forum but it is related to database call. this is my code: public DataSet CustomerDetails_Select(Int32 ID)    {      DataSet ds = new DataSet();      WIMConnect wimcon = new WIMConnect();      WIMConnection cnnwim = new WIMConnection();      ConvertDataReaderToDataTable DrToDs = new ConvertDataReaderToDataTable();      GridViewHeadersDao gvh = new GridViewHeadersDao();       &nb...

Is a there a simple way to copy a user to another user?
Hi All, I was wondering if there is a way to copy roles and permissions assigned to user 1 to user 2. Thanks dlj This is a multi-part message in MIME format. ---=_forums-1-dub3fa7d387 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I have attached a stored procedure to reverse engineer the grants for a login or for all users in a database. You can send the output to a file and edit the results. On going, my policy is to use only groups and/or roles to grant permissions even when only a single individual is concerned. Ad...

User Interface to improve aware users security
Name: Kevin Chadwick Email: trustlevel-twoatyahoodotcodotuk Product: Firefox Summary: User Interface to improve aware users security Comments: I always use firefox over opera (unless waiting for update) but there is one feature that I love in opera. Which is the ability to customise the interface to a great level. The main reason I like that feature is because they give you the ability to replace the google search box (I use a tiny bookmark/url bar syntax instead) with "enable javascript, enable cookies, and the best one, enable (disable) plug-ins" with a si...

(IN)SECURE Magazine from Net-Security (PDF download)
A little more light reading :-) Latest issue, #13: http://www.net-security.org/insecuremag.php (86 pages, with ads [not animated ads] - like a printed magazine) Archives of past issues: http://www.net-security.org/insecure-archive.php ISSUE 13 (September 2007) * Interview with Janne Uusilehto, Head of Nokia Product Security * Social engineering social networking services: a LinkedIn example * The case for automated log management in meeting HIPAA compliance * Risk decision making: whose call is it? * Interview with Zulfikar Ramzan, Senior Principal Re...

Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)
Hi when i try and open a database in sql server management studio i get the error "Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)", what can i do to rectify this, i have googled around and still havent found no answers. Which authentication mode is your Sql Server configured - MixedMode, Windows Authentication or Sql Server Authentication? Please refer to http://msdn2.microsoft.com/en-us/library/ms366351.aspx and http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx    Ple...

Extending user fields
I'm creating a module that stores guild "gaming" info about each portal member. One way is to create a table like:GuildUsersTableuser_idcharacter_nameplayer_levelBut my thoughts are that I could make this user definable, and be able to use this system for multiple games. That brings us to the attribute-value pair method:DataTable - defines and assigns the datadata_iduser_idattribute_idvalueAttributeTable - describes the dataattribute_idattribute_titleattribute_typeOf course, this method sucks to work with. If you don't know what the data is at design time, all you can really d...

Web resources about - Is there a way to User.GetAllRoles? - asp.net.security

Resources last updated: 12/3/2015 7:54:49 PM