It looks like the default Membership Provider (and Role Provider) always
goes to the database to get its info.
(GetUsers, GetRoles, etc , etc).
I guess I'm going to roll my own, because I am going to need a cached
solution to avoid the database hits.
(My roles and users seldom/never change after a project rollout)
I wanted to ask in general (before I start the work of a custom membership
provider).
A. Am I right with my assumption? (no caching)
B. Is there some .config way to get caching from teh default providers that
I don't know about?
C. I really don't have any issue with ~~how the default ones work, just the
non caching. You think I might be able to use inheritance and just address
those issues?
D. If the above answers eventually lead to "roll your own", does anyone
know of a project/source showing a good "roll your own" solution.
I just got back from a long weekend trip in the car with my wife and 3 dogs.
So I'm a little on the "tuckered out" side today.
Thanks......... ..... 4 4719
Hmm, 1 wife and 3 dogs? That could be part of the problem.
Anyway, the only caching I know of is the CacheRolesInCoo kie directive.
If you really think you need caching (and in fact you may not really need it
at all, so you should test first under load), then you are going to have to
roll your own.
Scott Guthrie has some nice links to sample custom providers on his blog.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"sloan" wrote:
It looks like the default Membership Provider (and Role Provider) always
goes to the database to get its info.
(GetUsers, GetRoles, etc , etc).
I guess I'm going to roll my own, because I am going to need a cached
solution to avoid the database hits.
(My roles and users seldom/never change after a project rollout)
I wanted to ask in general (before I start the work of a custom membership
provider).
A. Am I right with my assumption? (no caching)
B. Is there some .config way to get caching from teh default providers that
I don't know about?
C. I really don't have any issue with ~~how the default ones work, just the
non caching. You think I might be able to use inheritance and just address
those issues?
D. If the above answers eventually lead to "roll your own", does anyone
know of a project/source showing a good "roll your own" solution.
I just got back from a long weekend trip in the car with my wife and 3 dogs.
So I'm a little on the "tuckered out" side today.
Thanks......... .....
look into using the "profile" object http://www.codersource.net/published...n_asp_net.aspx
"sloan" <sl***@ipass.ne twrote in message news:e%******** ********@TK2MSF TNGP04.phx.gbl. ..
It looks like the default Membership Provider (and Role Provider) always
goes to the database to get its info.
(GetUsers, GetRoles, etc , etc).
I guess I'm going to roll my own, because I am going to need a cached
solution to avoid the database hits.
(My roles and users seldom/never change after a project rollout)
I wanted to ask in general (before I start the work of a custom membership
provider).
A. Am I right with my assumption? (no caching)
B. Is there some .config way to get caching from teh default providers that
I don't know about?
C. I really don't have any issue with ~~how the default ones work, just the
non caching. You think I might be able to use inheritance and just address
those issues?
D. If the above answers eventually lead to "roll your own", does anyone
know of a project/source showing a good "roll your own" solution.
I just got back from a long weekend trip in the car with my wife and 3 dogs.
So I'm a little on the "tuckered out" side today.
Thanks......... .....
Public Class ModifiedSqlMemb ershipProvider
Inherits SqlMembershipPr ovider http://www.devx.com/asp/Article/29256/0/page/3
It looks like if I'm mostly happy with the default provider, I can just
inherit from SqlMembershipPr ovider.
Well, that's what that URL says. I'm gonna check it out.
.........
"Peter Bromberg [C# MVP]" <pb*******@yaho o.yabbadabbadoo .comwrote in
message news:01******** *************** ***********@mic rosoft.com...
Hmm, 1 wife and 3 dogs? That could be part of the problem.
Anyway, the only caching I know of is the CacheRolesInCoo kie directive.
If you really think you need caching (and in fact you may not really need
it
at all, so you should test first under load), then you are going to have
to
roll your own.
Scott Guthrie has some nice links to sample custom providers on his blog.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"sloan" wrote:
It looks like the default Membership Provider (and Role Provider) always
goes to the database to get its info.
(GetUsers, GetRoles, etc , etc).
I guess I'm going to roll my own, because I am going to need a cached
solution to avoid the database hits.
(My roles and users seldom/never change after a project rollout)
I wanted to ask in general (before I start the work of a custom
membership
provider).
A. Am I right with my assumption? (no caching)
B. Is there some .config way to get caching from teh default providers
that
I don't know about?
C. I really don't have any issue with ~~how the default ones work, just
the
non caching. You think I might be able to use inheritance and just
address
those issues?
D. If the above answers eventually lead to "roll your own", does anyone
know of a project/source showing a good "roll your own" solution.
I just got back from a long weekend trip in the car with my wife and 3
dogs.
So I'm a little on the "tuckered out" side today.
Thanks......... .....
Here is some code to start (a future reader) out in the right direction:
I have a formal framework to cache data. So I had to leave that part out.
But the method are ensapsulated enough to get the idea.
If you're interested in my framework idea, check this out:
http://sholliday.space s.live.com/Blog/cns!A68482B9628 A842A!125.entry
public class CachedSqlRolePr ovider : SqlRoleProvider
{
private readonly string KEY_ALL_ROLES = "AllRolesKe y";
private string[] GetCachedRoles( )
{
//I have a Framework piece to cache data
//Implement your caching strategry here
return null;
}
private void CacheRoles(stri ng[] roles)
{
//I have a Framework piece to cache data
//Implement your caching strategry here
}
public override string[] GetAllRoles()
{
string[] returnValues;
returnValues = this.GetCachedR oles();
//if there wasn't anything in the Cache, to use the base method to get a
fresh copy
if (null == returnValues)
{
//this will end up hitting the db
returnValues = base.GetAllRole s();
if (null != returnValues)
{
//we got them, cache them for next time
this.CacheRoles (returnValues);
}
}
return returnValues;
}
} This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: WB |
last post by:
Hi,
I am revamping my company's website with ASP.Net 2.0. In order to use our
existing user data in our SQL 2000, I have written a custom membership
provider. However, when I try to logon with the Login control, it gives an
error:
System.Data.SqlClient.SqlException: Could not find stored procedure
'dbo.aspnet_CheckSchemaVersion'.
Is it because I have not run the aspnet_regsql.exe yet? Do I have to?
|
by: Morgan |
last post by:
Sorry for cross post, forgot to include aspnet in orinal...
Thanks in advance for any assistance.
I'm in the process of implementing custom RoleProvider & Membership Provider
objects and have run into a snag with the Membership Provider.
It seems many of the MembershipUser properties are read-only. This seems,
well stupid, IMO.
|
by: Bruno |
last post by:
Hello,
VS.net installs sql express as datastore for role/membership management.
I don't like this! I'm not able to choose other databases like ms-access, in
the Web Site Administration Tool . (Only AspNetSqlProvider)
I've tryed some c# stuff, but id did not work for me, to much trouble. I
wish to work with vb.net anyway.
Is there a tool/programm or something with less trouble, so i can choose
from different providers in the Web Site...
|
by: thomas |
last post by:
Hello All,
How to change the default Membership Provider during the runtime?
I know I can reference any provider I want, e.g.: provider =
Membership.Providers
but the question is how to change the default one, so all those new, cool
controls can start using the one I want.
I can specify the provider for each of those controls, e.g.:
|
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= |
last post by:
I have been having some trouble with implementing a custom Membership
Provider. We have a custom data store and business logic that pulls user
information. I need some level of functionality above and beyond what the
prodiver currently allows. I need the ability to access a user id and the
user's permission id. With Forms authentication in 1.1, I would just create
a custom identiy and principal and store the information in the identity....
| |
by: =?Utf-8?B?WmhlbmcgQ2hlbg==?= |
last post by:
I have an aspnetdb database sitting in different domain with the web server.
To authenticate a user and populate membership provider, WCF is used.
However, I have no idea how to pass the membership provider back to web
server. Therefore, I can not use the role feature in the web.sitemap. All the
sample code I found uses the membership provider at server site on the same
domain with the aspnetdb. No sample solution passes the membership...
|
by: Jonathan Wood |
last post by:
Although this will be a challenge at my level of ASP.NET knowledge, I'm
thinking I should implement my own membership provider class.
Looking over the methods I must implement, a number of questions come to
mind.
1. How would one implement GetNumberOfUsersOnline? I'm not sure where there
is any indication of this? And it this affected by the "Remember me next
time" checkbox, which doesn't seem to work like it does on any other site...
|
by: Andy B |
last post by:
I have a database with asp.net membership inside it. How would I use it for
2 or more web applications at the same time?
|
by: dm3281 |
last post by:
Hello --
I need to write an ASP.NET 2.0 application for our clients to use to login
and verify file transmissions. Each client will need their own logon, in
addition to a way to assign each user a unique customerid. All users
beloning to the same custeromid would see the same information on the
website.
Can I easily do this using membership services or must I use a combination
of membership services and profiles?
|
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: 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...
| |
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...
|
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: 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
| |