Hi
I'm currently developping a University portal that uses single sign on
between multiple applications, and I would like to store my users in one
application and share them with other applications while keeping the roles
unique per application. For our portal, all our users would go in an
application called "UniversityPort al", and roles would be created in each
course application. Here's an example illustrating our proposed structure.
Applications Roles
UniversityPorta l Application (Administrators , Editors, ...)
Chemistry Application (Students, Teachers, ...)
Religion Application (Students, Teachers, ...)
Math Application (Students, Teachers, ...)
I've noticed that when I call SqlRoleProvider .AddUsersToRole s("francis",
Students") from within the Chemistry Application, and then from the Religion
Application new records get added to the Users table each with a unique user
ID. Why is this, and is there a way to prevent this duplication of user data?
Also does this mean if a user wants to change his password, does he have to
do it for every application? I would really appreciate any feedback or advice
that could help me out.
Cheers
Francis 4 1344
Aside from the fact that it's usually not a good idea to mix Chemistry with
Religion anyway, probably the cleanest was to handle this is to override the
SqlRoleProvider class with custom methods that accept an applicationID, and
pass this concept through to the stored procedures, which can be easily
modified.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"Francis Reed" wrote: Hi
I'm currently developping a University portal that uses single sign on between multiple applications, and I would like to store my users in one application and share them with other applications while keeping the roles unique per application. For our portal, all our users would go in an application called "UniversityPort al", and roles would be created in each course application. Here's an example illustrating our proposed structure.
Applications Roles
UniversityPorta l Application (Administrators , Editors, ...) Chemistry Application (Students, Teachers, ...) Religion Application (Students, Teachers, ...) Math Application (Students, Teachers, ...)
I've noticed that when I call SqlRoleProvider .AddUsersToRole s("francis", Students") from within the Chemistry Application, and then from the Religion Application new records get added to the Users table each with a unique user ID. Why is this, and is there a way to prevent this duplication of user data? Also does this mean if a user wants to change his password, does he have to do it for every application? I would really appreciate any feedback or advice that could help me out.
Cheers Francis
Hi Peter
That's a great idea which will work very well in my situation. I decided to
derived from the SqlRoleProvider as shown below.
public class EconcordiaSqlRo leProvider : SqlRoleProvider
{
public EconcordiaSqlRo leProvider () : base()
{
}
}
I have a quick question concerning the SqlRoleProvider . Where is the
SqlConnection, ConnectionStrin g, or ConnectionStrin gName stored in the
SqlRoleProvider instance? I want to use that connection for my custom methods
which accept the applicationID. If you can help me out or give any advice, I
would really appreciate it.
Cheers
Francis
"Peter Bromberg [C# MVP]" wrote: Aside from the fact that it's usually not a good idea to mix Chemistry with Religion anyway, probably the cleanest was to handle this is to override the SqlRoleProvider class with custom methods that accept an applicationID, and pass this concept through to the stored procedures, which can be easily modified. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
<!-- membership provider -->
<roleManager enabled="true" cacheRolesInCoo kie="true"
createPersisten tCookie="true" >
<providers>
<remove name="DefaultRo leProvider" />
<add applicationName ="/" connectionStrin gName="LocalSql Server"
name="DefaultRo leProvider"
type="System.We b.Security.SqlR oleProvider" />
</providers>
</roleManager>
-- the provider name and type would be replaced with your custom provider
name and namespace/class names.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"Francis Reed" wrote: Hi Peter
That's a great idea which will work very well in my situation. I decided to derived from the SqlRoleProvider as shown below.
public class EconcordiaSqlRo leProvider : SqlRoleProvider { public EconcordiaSqlRo leProvider () : base() { } }
I have a quick question concerning the SqlRoleProvider . Where is the SqlConnection, ConnectionStrin g, or ConnectionStrin gName stored in the SqlRoleProvider instance? I want to use that connection for my custom methods which accept the applicationID. If you can help me out or give any advice, I would really appreciate it.
Cheers Francis
"Peter Bromberg [C# MVP]" wrote:
Aside from the fact that it's usually not a good idea to mix Chemistry with Religion anyway, probably the cleanest was to handle this is to override the SqlRoleProvider class with custom methods that accept an applicationID, and pass this concept through to the stored procedures, which can be easily modified. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
I have the following
<roleManager enabled="true">
<providers>
<clear />
<add
name="AspNetSql RoleProvider"
type="Econcordi aSqlRoleProvide r, Econcordia, Version=1.0.0.0 ,
Culture=neutral , PublicKeyToken= null"
connectionStrin gName="LocalSql Server"
applicationName ="/UniversityAppli cation"
/>
</providers>
</roleManager>
which is working good in the web.config, but my question was more about the
c# SqlRoleProvider class members. I don't see a member that contains the
connectionStrin g. Like in the following.
public class EconcordiaSqlRo leProvider : SqlRoleProvider
{
public EconcordiaSqlRo leProvider () : base()
{
}
public string[] myMethod()
{
SqlConnection c = new SqlConnection(t his._connection String);
...
}
}
Where this._connectio nString is a member from the inherited SqlRoleProvider
class. Do I have to code the this._connectio nString myself, or is it
inherited somehow from the SqlRoleProvider class?
Cheers
Francis
"Peter Bromberg [C# MVP]" wrote: <!-- membership provider --> <roleManager enabled="true" cacheRolesInCoo kie="true" createPersisten tCookie="true" > <providers> <remove name="DefaultRo leProvider" /> <add applicationName ="/" connectionStrin gName="LocalSql Server" name="DefaultRo leProvider" type="System.We b.Security.SqlR oleProvider" /> </providers> </roleManager>
-- the provider name and type would be replaced with your custom provider name and namespace/class names.
Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
"Francis Reed" wrote:
Hi Peter
That's a great idea which will work very well in my situation. I decided to derived from the SqlRoleProvider as shown below.
public class EconcordiaSqlRo leProvider : SqlRoleProvider { public EconcordiaSqlRo leProvider () : base() { } }
I have a quick question concerning the SqlRoleProvider . Where is the SqlConnection, ConnectionStrin g, or ConnectionStrin gName stored in the SqlRoleProvider instance? I want to use that connection for my custom methods which accept the applicationID. If you can help me out or give any advice, I would really appreciate it.
Cheers Francis
"Peter Bromberg [C# MVP]" wrote:
Aside from the fact that it's usually not a good idea to mix Chemistry with Religion anyway, probably the cleanest was to handle this is to override the SqlRoleProvider class with custom methods that accept an applicationID, and pass this concept through to the stored procedures, which can be easily modified. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mark |
last post by:
I have an asp.net ecommerce web application on a remote web server.
I'm using an Access database on the back end. I've notice a few
strange things. When I mimic an multiple user environment by surfin
it in multiple browsers simultaneously the site generates a generic
runtime error after awhile. I'm thinking this has something to do
with my access database and multiple connections. I'm using forms
authentication with a login page. Is...
|
by: Nabani Silva |
last post by:
Hi, hope someone could help
I need to share session state (and contents) through differente web
applications.
I'm trying to get it done by using StateServer session state, below I paste
code for web.config. Both applications are on the same server (I don't want
to include all applications into one common virtual directory or
application)
|
by: qube3 |
last post by:
We have applications written by JSP/Servlet and ASP.NET. All our future
development would be based on ASP.NET.
We wants to develop a single user interface so that users would not be aware
that some of the modules they are using are implement by JSP or ASP.NET
(e.g. no need to login both JSP and ASP.NET applications)? Are there any
suggestions to share the session in formation among JSP and ASP.NET, or some
single-sign on solution.
|
by: Tod Birdsall, MCSD for .NET |
last post by:
Hi All,
I have two ASP.NET applications which I am trying to have share forms
authentication. But I am running into problems.
App A is an ASP.NET 2.0 Beta 2 application. App B is an ASP.NET 1.1
application (Telligent's Community Server) compiled with VS.NET 2003.
App B runs in a virtual sub-directory of App A. Both applications run
fine. Both site's ASP.NET tabs are set appropriately (A = 2.0.5X B =
|
by: Jake Peters |
last post by:
I'd like to know how to get a users various table
privilages from a sql server (insert/delete/update), so
that i can set controls to behave accordingly (read only,
hidden, disable "insert" button, etc). I'm sure it can't
be too difficult, but I've been having a hard time finding
any revelant information when doing searches.
I know sql can just throw back an exception to let the user
know, but my goal is to make custom controls that get...
| |
by: Douglas J. Badin |
last post by:
Hi,
The problem with Authorization is it stops at the first match and doesn't
permit Grouping.
On the Web Site, I am trying to Secure Page Access and SiteNaviagation by
implementing the following ASP.NET 2.0 features:
- Membership
- Site Maps
|
by: Matt Adamson |
last post by:
Guys,
I'm unsure how to use windows authentication in an intranet application. I'd
like to user existing windows account to identify users however the issue I
have is how to then add settings to those users and map them to roles.
If I'd like to restrict the windows users which log on and what tasks they
can perform in the application how should I do this? Presumably I'd need one
user to log in initially and perform admin type tasks...
|
by: xke |
last post by:
My question is, using aspnet membership model, can I have the same
users but with different roles assigned per application ?
I know two application can share the users by having the same appname
in web.config but the question I'd like to ask is if they can have
different roles based on the application.
Thanks,
xke
|
by: raamay |
last post by:
We can define Users and Roles for datbases and tables in SQL server but i wonder how this can be implemented in real time applications developed in platforms like VB, VB.Net etc..
I mean when we create applications, we do create the login form to enter the application. Once a user is inside the application, he/she should be having different privieleges. Some users can only view the informations and some can add/edit/delete informations...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |