RE: Sharing Users, but not roles between Applications
- From: Peter Bromberg [C# MVP] <pbromberg@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 10 Apr 2006 11:09:01 -0700
<!-- membership provider -->
<roleManager enabled="true" cacheRolesInCookie="true"
createPersistentCookie="true" >
<providers>
<remove name="DefaultRoleProvider" />
<add applicationName="/" connectionStringName="LocalSqlServer"
name="DefaultRoleProvider"
type="System.Web.Security.SqlRoleProvider" />
</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 EconcordiaSqlRoleProvider : SqlRoleProvider
{
public EconcordiaSqlRoleProvider () : base()
{
}
}
I have a quick question concerning the SqlRoleProvider. Where is the
SqlConnection, ConnectionString, or ConnectionStringName 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
- Follow-Ups:
- RE: Sharing Users, but not roles between Applications
- From: Francis Reed
- RE: Sharing Users, but not roles between Applications
- Prev by Date: Re: Better way? (DataView question)
- Next by Date: Re: AJAX libraries
- Previous by thread: bind menu control with a dataset
- Next by thread: RE: Sharing Users, but not roles between Applications
- Index(es):
Relevant Pages
|