473,669 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

questions about membetship and role

Jo
Hi,

I know how to create membership user and to define role via "Administer
website" in design mode of e.g. an ASP.NET login control.

My questions are:
1) how to create a membership user directly in web.config?
2) how to define a role directly in web.config?
3) how to assign a existing membership user to an existing role in
web.config?
4) how to assign a new created membeship (with createuserwizar d control) to
an existing role programmaticall y (i mean: at the moment the new account is
created in the aspx page)?
Thanks
Jo
Apr 10 '07 #1
3 2652
Jo
I just read some stuffs about this, so:
1) not possibel, must be inputted in a table
2) same answer
3) not possible; must be done via Administrate website

But for 4) i couldn't find an answer, so if you know it ... thanks in
advance.
"Jo" <qs*@qcq.dcschr eef in bericht
news:OO******** ******@TK2MSFTN GP04.phx.gbl...
Hi,

I know how to create membership user and to define role via "Administer
website" in design mode of e.g. an ASP.NET login control.

My questions are:
1) how to create a membership user directly in web.config?
2) how to define a role directly in web.config?
3) how to assign a existing membership user to an existing role in
web.config?
4) how to assign a new created membeship (with createuserwizar d control)
to an existing role programmaticall y (i mean: at the moment the new
account is created in the aspx page)?
Thanks
Jo

Apr 10 '07 #2
The CreateUserWizar d has an event UserCreated (or similar) - here you can
use the Roles class to add the user to a role

Roles.AddUserTo Role(...);
-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)
I just read some stuffs about this, so:
1) not possibel, must be inputted in a table
2) same answer
3) not possible; must be done via Administrate website
But for 4) i couldn't find an answer, so if you know it ... thanks in
advance.

"Jo" <qs*@qcq.dcschr eef in bericht
news:OO******** ******@TK2MSFTN GP04.phx.gbl...
>Hi,

I know how to create membership user and to define role via
"Administer website" in design mode of e.g. an ASP.NET login control.

My questions are:
1) how to create a membership user directly in web.config?
2) how to define a role directly in web.config?
3) how to assign a existing membership user to an existing role in
web.config?
4) how to assign a new created membeship (with createuserwizar d
control)
to an existing role programmaticall y (i mean: at the moment the new
account is created in the aspx page)?
Thanks
Jo

Apr 10 '07 #3
Jo
Thanks

"Dominick Baier" <dbaier@pleasep leasenospam_lea stprivilege.com schreef in
bericht news:51******** *************** **@news.microso ft.com...
The CreateUserWizar d has an event UserCreated (or similar) - here you can
use the Roles class to add the user to a role

Roles.AddUserTo Role(...);
-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications
(http://www.microsoft.com/mspress/books/9989.asp)
>I just read some stuffs about this, so:
1) not possibel, must be inputted in a table
2) same answer
3) not possible; must be done via Administrate website
But for 4) i couldn't find an answer, so if you know it ... thanks in
advance.

"Jo" <qs*@qcq.dcschr eef in bericht
news:OO******* *******@TK2MSFT NGP04.phx.gbl.. .
>>Hi,

I know how to create membership user and to define role via
"Administer website" in design mode of e.g. an ASP.NET login control.

My questions are:
1) how to create a membership user directly in web.config?
2) how to define a role directly in web.config?
3) how to assign a existing membership user to an existing role in
web.config?
4) how to assign a new created membeship (with createuserwizar d
control)
to an existing role programmaticall y (i mean: at the moment the new
account is created in the aspx page)?
Thanks
Jo


Apr 10 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3381
by: Ken Varn | last post by:
I have a couple questions/comments concerning dot net and the future of dot net development. If someone could address these, please do so. First of all, with the advent of .net and the use of namespaces, why can't I reference a public class that is contained in an EXE from another EXE? It seems that the only way to access other classes from other process is through a DLL. In comparison to Java, where all compiled code goes into a...
6
1166
by: craig | last post by:
I have two questions that aren't necessarily C#-related, but I think there are many people in this forum who have some insight into these concepts, so I thought I would ask anyway: 1. Assume you are developing an application which incoporates a role-based security model. An administrator can define roles with specific privileges and then add users to those roles. After a user has been authenticated, their role information is retrieved...
6
1414
by: John Lee | last post by:
Hi, I was trying to find an elegant way of implementing/modelling the following scenario: student, borrower, reference and cosigner are all human beings - we would think to create a person base class and then create one class for each of the person type inheriting from person class - student is "IS-A" person, ... but there is chances that the student and the borrower will be the same person, how could we implement this in C#?
1
2130
by: Craig Buchanan | last post by:
I am using flag as the identifier for various security settings. For instance: Public Enum SecurityEnum Read=0 Write=1 Delete=2 ... End Enum
0
862
by: The Confessor | last post by:
I'm relatively new to using FileStreams, so bear with me. I'm trying to use the following code Dim MapGraphicsFileStream As New System.IO.FileStream(MapGraphicsFile, System.IO.FileMode.Create) Dim MapGraphicsFileStreamWriter As New System.IO.BinaryWriter (MapGraphicsFileStream) Dim A As Integer For A = 0 To MapGraphics.GetUpperBound(0)
4
3525
by: cybertoast | last post by:
i seem to have some misunderstanding about how roles work in sql server 2005. i see that i can add a role to a database (dbname->->properties->permissions->. THis allows me to add either users or roles. Users can be added programmatically using sp_grantdbaccess @username, but this does not allow for addition of roles to access the database (i.e., sp_grantdbaccess @rolename does not work). Is there some other command that is used to add...
3
1196
by: djc | last post by:
I have a couple questions about authentication and authorization in asp.net 2.0. 1) I see there are still the same authentication mode options as in 1.1 (windows, forms, or passport). However in reading through some of the new documentation I see reference to 'membership' a lot. How does membership relate to all this? Is it simply enhanced classes used with 'forms' based authentication? does it also apply to windows authentication mode?...
22
6206
by: gustum | last post by:
Im graduating in the coming december. Anyone pls guide me where i can get c++ interview questions. I shall be very thankful to you if you provide me good link so any stuff if you have regarding c++, databases, algorithms, data structures and software engineering. Thanks, Al Pacino
0
2432
by: deshaipet | last post by:
Hi - We have primary and standby databases on different servers. Here is my /etc/service entry for HADR pair : On Primary : "vi /etc/services
0
8893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8802
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8586
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7405
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.