473,769 Members | 6,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User controls and authentication problems...

Hi all,

An example layout of my page...
UC: Log Out linkbutton
PAGE:
Table
Row: UserName _______
Row: Password _______
Row: Logon Button
The idea is to show the Log Out linkbutton when the page is logged in and
the table is made invisible. I am using User.Identity.I sAthenticated to
manage making things visible or not...

The UC control actually verifies the logon account and password against the
database.
First come to page.

IsAuthenticated is false.
UC: is not visible
Table is visible

Enter username and password

Order of processing is:
PAGE: Page_Load
UC: Page_Load

This causes me an issue as I can get the Log Out button to show (as the UC
sets IsAuthenticated to true) but as the PAGE: Page_Load is prior to the UC:
verification, so the User/Pass table is still visible. I can't call the
table from the usercontrol as the control is held on many pages and not
every page has the username/password boxes.

The other side of the coin is also true. I click log out, the log out
disappears (as IsAuthenticated is false) but the table is not visible
(assuming I have done a refresh of the page to get the table to disappear)

Aaaarrrrgggghhh h!!!!! I have spent ages trying to make this work. I am soooo
frustrated. :-(

How can I get round it. The log out needs to be at the top of the page, the
UserName/Password boxes where the action is, so that people can quickly do
what they need to do that requires authentication.
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
Nov 19 '05 #1
2 1044
I'm not sure if I got it right, but why don't you toggle the visibility
of your password controls in the PreRender event?

PreRender usually is an ideal place to do this kind of stuff, as there
could be still a lot of processing happening after the Load event (as
you experience), which changes the state of your page/model. The
UI/HTML that is posted back to the client browser in the http response
should represent the latest state of your session - changing these UI
properties in the load event is therefore usually a bit too early.

Nov 19 '05 #2
Hi Stefan,

Thanks for your suggestion, I will try it.

Are there any potential issues with putting code in the pre-render?

Best regards,
Dave Colliver.
http://www.DerbyFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Stefan" <Cl*********@gm ail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
I'm not sure if I got it right, but why don't you toggle the visibility
of your password controls in the PreRender event?

PreRender usually is an ideal place to do this kind of stuff, as there
could be still a lot of processing happening after the Load event (as
you experience), which changes the state of your page/model. The
UI/HTML that is posted back to the client browser in the http response
should represent the latest state of your session - changing these UI
properties in the load event is therefore usually a bit too early.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1377
by: Ed Ploy | last post by:
Would anyone care to point me to a good site or group for troubleshooting user .Net / Passport login problems? I've turned up a lot of development info (such as this group), but little on subscriber and authentication problems. Specifically, I'm a service tech who has a customer having troubles logging in to her Hotmail account from her particular machine. Other machines login to her account fine, including the machines on my workbench....
1
2337
by: Sean C. | last post by:
Helpful folks, We have been having an intermittent and completely unreproducable problem concerning user authentication on Windows 2000: SQL1403N The username and/or password supplied is incorrect. SQLSTATE=08004 DB2 v7.2 fp5 Windows 2000
3
5409
by: Litening | last post by:
Hi Can someone please supply me with a program (perhaps the C source) that authenticates a user on AIX (against the password/shadow/security file(s))? So far I have the following from IBM, but I don't know how to implement it (I'm not really a programmer): _______________________
5
392
by: Andrew Banks | last post by:
Using forms authentication in C# I usually use FormsAuthentication.RedirectFromLoginPage to log a user in as follows FormsAuthentication.RedirectFromLoginPage(id,false); How can I log a user in without re-directing them somewhere else? I simply want to log the in and then run some other code without re-directing them. I've tried .SetAuthCookie(id,false) but this doesn't seem to work.
5
4401
by: cdlipfert | last post by:
Our intranet is running under windows integrated security. We have domain users that want to access our intranet site via ssl vpn. SSL VPN can not authenticate against services that run under windows integrated security. In order to get around this issue it seems that we would need to create a login page on a separate site that runs under anonymous security. Then pass the users credentials to the site running under integrated security. ...
1
1551
by: Kirk Groome | last post by:
Hi all, I'm working on a web site and I would like to use the VS login controls. The problem I'm having is that when I create a new user all works fine. The user gets added to the database and is logged in to the web site. the problem is when you leave the web site you can not login again. I get a message " Your login attempt was not successful. Please try again.". I have a form where I have added the LogIn, LoginStatus, LoginName, and...
6
1985
by: =?Utf-8?B?U2hlcnJp?= | last post by:
I know this question has been posted in many places, but I have not been able to solve our current problem. The developers in my office are all new to C#.net. We have been developing an application using Visual Studio .NET 2003 and IIS 6 with SQL Server 2000. Up until this point each developer has used a local copy of IIS and connected to sql server on a remote server without any problems. Next week we have a demo, and I have tried to...
2
2082
by: mark4asp | last post by:
This is a simplified version of my site. There are Premium users who have access to the Premium directory. Anyone else attempting to access it should be logged and then redirected to the Premium.aspx - which explains the advantages of being a Premium member and provides examples of content. The default page for site visitors is "News/Default.aspx" but only those with cookies set should go there otherwise visitors need to login to...
15
2705
by: paul814 | last post by:
Is it possible to display the logged in user that is accessing the form, in a textbox? so say I have txtname I want to display the username of the person that is logged in to the PC in that box, can I do this? How would this be done?
0
10216
Oralloy
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...
0
10049
jinu1996
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...
1
9997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
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...
1
7413
isladogs
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...
0
5309
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...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
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
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.