I extended Membership provider, put Login box onto the page,
associated it with my provider.
After successful login I need to redirect user based on one of the
fields in my Logins (Users) table - UserType (i do have roles, but i
don't use them here). But i can't see how i can access membership
extended class and all its overridden methods and properties, indeed I
do not create it explicitly! 4 1504
if you "extended" the Membership class and it is registered properly in your
web.config, you should be able to access it through the Membership type same
as you would do before you "extended" it. You aren't providing enough
information to know what "extended" means here - normally one would write a
custom provider that inherits from ProviderBase.
-- peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"al*******@gmail.com" wrote:
I extended Membership provider, put Login box onto the page,
associated it with my provider.
After successful login I need to redirect user based on one of the
fields in my Logins (Users) table - UserType (i do have roles, but i
don't use them here). But i can't see how i can access membership
extended class and all its overridden methods and properties, indeed I
do not create it explicitly!
Seems like i've made reply to the author.
Ok, so the question was - should I create my own instance of my
membership-extended class to get to know additional info about logged
user like this
protected void WizardLogin_LoggedIn(object sender, EventArgs e)
{
DB2MembershipProvider db2Provider = new DB2MembershipProvider();
MembershipUser db2user = db2Provider.GetUser(WizardLogin.UserName);
// and so forth i can get to know all db fields
}
or I may somehow get pointer to instance, that has been created when I
logged-in via Login control?
Why should I create one more instance, if there was already one
created with login class?
Ok, I can see that my suggestion is wrong - when I put something
inside of LoggedIn event, I get connection error when just logging-in.
Maybe I use instantiating incorrectly, but I would rather try to get
instance reference from login control...
Well, getting current membership user object is possible via static
membership class:
....LoggedIn(...) {
MembershipUser userInfo = Membership.GetUser(WizardLogin.Username,
true);
....
}
but I'd like to know how get rid of extra db call - if it really makes
a sense.
Maybe I should somehow save all often-required data from logins table
to use across the pages?
What is suitable for storing this? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: John Smith |
last post by:
I have a user assigned multiple roles and a role can be inherited from
multiple parents (see below). How do I answer such questions as "How
many roles does the user belongs to?"
I answered the...
|
by: craig |
last post by:
I am working on my first .NET development project that involves custom
role-based security per the project requirements. This lead to a general
design issue this week that really caused us some...
|
by: Christopher Harrison |
last post by:
Is there a way to store an indefinite number of keys in one field and
self join them? Imagine, for example, you have a table of users with a
"friends" column. Say user 1 is friends with users 9, 7,...
|
by: Steven Stewart |
last post by:
Hi there,
I have posted about this before, but yet to arrive at a solution. I am
going to try to explain this better.
I have an Employees table and a Datarecords table (one-to-many...
|
by: Matthias S. |
last post by:
Hi,
here is what I'm trying to do: I have a virtual directory called
"WebApp". Under this one I've got 2 physical directories called
"Customers" and "Admins".
I implemented Forms-based...
|
by: Graham |
last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
|
by: VB Programmer |
last post by:
How can you have multiple DestinationPageUrl's, based on their role. For
example, if their an admin, then goto admin.aspx. If they're a member, goto
member.aspx.
Thanks!
|
by: thomson |
last post by:
Hi All,
i do hae a solution in which i do have mulitple projects
including Web Projects,, Depending on the functionality it gets
redirected to different web projects and it is working fine,
...
|
by: Glenn |
last post by:
My current classic-ASP site has users, projects, roles and the 2.0
membership looks like a perfect fit, but I'm having trouble finding
examples of how to have users that belong to different...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
| | |