ASP.NET 2.0 Membership Login event

G

Guest

I am working on a site, and I am using ASP.NET 2.0 and its Membership
features to handle security. I need to run a little piece of code when
someone logs in. What event of the Login control would be the best place to
put this? I am having no luck getting this to work. I would think this
would be pretty common and shouldn't be this hard. Any help will be
appreciated. Thanks.
 
J

JIMCO Software

lanem said:
I am working on a site, and I am using ASP.NET 2.0 and its Membership
features to handle security. I need to run a little piece of code
when someone logs in. What event of the Login control would be the
best place to put this? I am having no luck getting this to work. I
would think this would be pretty common and shouldn't be this hard.
Any help will be appreciated. Thanks.

You should override ValidateUser.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
G

Guest

Could you give me some more details please? I don't really know how that
will help in this case. Thanks.
 
J

JIMCO Software

lanem said:
Could you give me some more details please? I don't really know how
that will help in this case. Thanks.

You said you wanted to execute some code when a user logs in via Membership.
If you want to do that, you would need to override ValidateUser. That's the
method that executes when users log in via Membership.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
G

Guest

If I override ValidateUser, will it still log the person in? I don't want to
replace the functionality of the Login control, I want to add something to
it. I want to update something else in my db when a user logs in. I don't
want to rewrite ValidateUser.
 
J

JIMCO Software

lanem said:
If I override ValidateUser, will it still log the person in? I don't
want to replace the functionality of the Login control, I want to add
something to it. I want to update something else in my db when a
user logs in. I don't want to rewrite ValidateUser.

Your first step is to review the documentation on overriding methods.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
C

clintonG

I would suggest the first thing lanem should consider is building a test
page that uses the Login control and converting the control to a template
where it could then be possible to learn more about which events are
supported. Then if an override is called for by all means more study would
be required.

Speaking directly to lanem however, there is not much documentation to help
neophytes or intermediate developers understand the new 2.0 controls. Most
of what has been written rehash the same shallow stuff. Some guys are
starting to write in-depth tutorials but I have to say I have yet to read
any such thing in any context from Jim Chesire other to observe him
conducting himself as a pompous @ss knowing that he has the technical skills
to be genuinely helpful. He chooses to conduct himself as he does. From time
to time we all can get this way but Chesire seems to be stuck on it.
Somebody needs to press his reset button.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 
J

JIMCO Software

clintonG said:
Speaking directly to lanem however, there is not much documentation
to help neophytes or intermediate developers understand the new 2.0
controls. Most of what has been written rehash the same shallow
stuff. Some guys are starting to write in-depth tutorials but I have
to say I have yet to read any such thing in any context from Jim
Chesire other to observe him conducting himself as a pompous @ss
knowing that he has the technical skills to be genuinely helpful. He
chooses to conduct himself as he does. From time to time we all can
get this way but Chesire seems to be stuck on it. Somebody needs to
press his reset button.

If you want to speak directly to someone, might I suggest you try e-mail.

You have likely benefited from research that I have done on ASP.NET 2.0 and
how to debug it. You have likely benefited from work I have done in ASP.NET
1.x as far as discovering bugs and teaching high end developers how to find
errors in their code. (I'm not at all suggesting that you are a high-end
developer.)

It should not be the responsibility of anyone here to re-write documentation
for someone that is already easily available. Overriding is an elementary
concept. If Lanem doesn't understand it, he would be much better off
researching it than having it spoon-fed to him. In my opinion, spoon-feeding
people the essentials is patronizing and a disservice.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
J

JIMCO Software

clintonG said:
I would suggest the first thing lanem should consider is building a
test page that uses the Login control and converting the control to a
template where it could then be possible to learn more about which
events are supported. Then if an override is called for by all means
more study would be required.

And by the way, I'm not sure what you mean by "converting the control to a
template", but that won't tell you anything. This is a very simple thing to
do. Simply override ValidateUser. That's all you have to do.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
C

clintonG

... If Lanem doesn't understand it, he would be much better off
researching it than having it spoon-fed to him. In my opinion,
spoon-feeding people the essentials is patronizing and a disservice.

As usual you miss the point even though I do agree with your premise --
somewhat -- because I choose to accept the 'ancient Chinese secret' that
suggests "if you give a man a fish you have fed him for a day, when you
teach a man to fish you have fed him for a lifetime" but your inference
suggesting your philosophy is not consistent with that adage and is thus
disengenuous as your rarely if ever teach anybody anything except to provide
persons with the insight that you conduct yourself as a pompous @ss who
profers pithy statements contending they are helpful. This is especially
noticeable when a person seeking help returns and clearly says they do not
understand.

No, I am not a 'high end developer' but I do consider myself a curious and
hard working intermediate who does have 'unofficial' university transcripts
I would put up against anything you may have to offer if one-upmanship is
the game you want to play. So tell me, do you want to put up or shut up? I
am not ashamed of my grades in computer science, math, physics, philosophy,
architecture and other areas of interest to me and I have no shame in not
knowing what I have yet to learn and master.

So the point is again, put up or shut up. Your personal ideas of 'help' are
often insufficient to what most need and are asking for. As I suggested, all
you may need yourself is a simple press of your reset button. Then again,
you may fear doing so as it just as well may result in the black screen of
death. Hurting people's feelings by reminding them how ignorant they may be
in comparsion to your presumed vast repository of knowledge is not very
helpful. It seems to me that you consider yourself to be the Great Wizard of
OZ.

The End.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top