|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can the Login control stop authenticating?This control can be dragged and dropped from the VS2008 Toolbox and if
Membership is setup correctly the Login control will login authenticated users --and-- display a message and stop the form from processing when unknown credentials are submitted, i.e. validation. Any attempt to use any code in any of the supported event handlers for this control causes the Login control to stop authenticating known users. There's other stuff going on but I didn't think or didn't know I would have to write all of the authentication code to authenticate a user trying to login simply because I was also using some other event handler for the Login control.
Show quote
Hide quote
"HillBilly" <nob***@nowhere.com> wrote in You don't have to rewrite everything if you are using the standard news:e4oHcNr$JHA.4984@TK2MSFTNGP05.phx.gbl: > This control can be dragged and dropped from the VS2008 Toolbox and if > Membership is setup correctly the Login control will login > authenticated users --and-- display a message and stop the form from > processing when unknown credentials are submitted, i.e. validation. > > Any attempt to use any code in any of the supported event handlers for > this control causes the Login control to stop authenticating known > users. There's other stuff going on but I didn't think or didn't know > I would have to write all of the authentication code to authenticate a > user trying to login simply because I was also using some other event > handler for the Login control. authentication method. If you are using custom tables, a database other than Access or SQL Server or completely changing authentication, then you do have to write a custom provider, but not for changing validation. You want to use the validating method and set e.Cancel = true when the user fails your scheme. That will not alter the normal operation for anyone you allow to pass through the gate. If I have missed the nail, post a follow up. -- Show quoteHide quoteGregory A. Beamer MVP; MCP: +I, SE, SD, DBA Twitter: @gbworld Blog: http://gregorybeamer.spaces.live.com ******************************************* | Think outside the box! | ******************************************* Not even using the template but bringing it right down to the basics noting
the Login.aspx control is loaded into a Panel and the Panel is in the MasterPage // will login but I do not know if it is using validation to catch unknown credentials <asp:Login ID="MemberLogin" runat="server" /> I do not know how to code this anymore because any event handler will cause the control to no longer authenticate and login a known user <asp:Login ID="MemberLogin" runat="server" OnAuthenticate="OnAuthenticate" /> Show quoteHide quote "Gregory A. Beamer" <NoSpamMgbworld@comcast.netNoSpamM> wrote in message news:Xns9C4159F606432gbworld@207.46.248.16... > "HillBilly" <nob***@nowhere.com> wrote in > news:e4oHcNr$JHA.4984@TK2MSFTNGP05.phx.gbl: > >> This control can be dragged and dropped from the VS2008 Toolbox and if >> Membership is setup correctly the Login control will login >> authenticated users --and-- display a message and stop the form from >> processing when unknown credentials are submitted, i.e. validation. >> >> Any attempt to use any code in any of the supported event handlers for >> this control causes the Login control to stop authenticating known >> users. There's other stuff going on but I didn't think or didn't know >> I would have to write all of the authentication code to authenticate a >> user trying to login simply because I was also using some other event >> handler for the Login control. > > You don't have to rewrite everything if you are using the standard > authentication method. If you are using custom tables, a database other > than Access or SQL Server or completely changing authentication, then > you do have to write a custom provider, but not for changing validation. > > You want to use the validating method and set e.Cancel = true when the > user fails your scheme. That will not alter the normal operation for > anyone you allow to pass through the gate. > > If I have missed the nail, post a follow up. > > > -- > Gregory A. Beamer > MVP; MCP: +I, SE, SD, DBA > > Twitter: @gbworld > Blog: http://gregorybeamer.spaces.live.com > > ******************************************* > | Think outside the box! | > *******************************************
Show quote
Hide quote
"HillBilly" <nob***@nowhere.com> wrote in That is used for custom authentication only. If you want to do your own news:OmVziTx$JHA.1248@TK2MSFTNGP04.phx.gbl: > Not even using the template but bringing it right down to the basics > noting the Login.aspx control is loaded into a Panel and the Panel is > in the MasterPage > > // will login but I do not know if it is using validation to catch > unknown credentials > <asp:Login ID="MemberLogin" runat="server" /> > > > I do not know how to code this anymore because any event handler will > cause the control to no longer authenticate and login a known user > > > <asp:Login ID="MemberLogin" runat="server" > OnAuthenticate="OnAuthenticate" /> > check and then allow normal authentication, then use OnLoggingIn. You can set e.Cancel = true when it breaks your rules. If you want to do something after a log in, you can use OnLoggedIn instead. -- Show quoteHide quoteGregory A. Beamer MVP; MCP: +I, SE, SD, DBA Twitter: @gbworld Blog: http://gregorybeamer.spaces.live.com ******************************************* | Think outside the box! | ******************************************* I've got something to work tonight thanks for bringing some choices to my
attention. Show quoteHide quote "Gregory A. Beamer" <NoSpamMgbworld@comcast.netNoSpamM> wrote in message news:Xns9C4181F24FBE7gbworld@207.46.248.16... > "HillBilly" <nob***@nowhere.com> wrote in > news:OmVziTx$JHA.1248@TK2MSFTNGP04.phx.gbl: > >> Not even using the template but bringing it right down to the basics >> noting the Login.aspx control is loaded into a Panel and the Panel is >> in the MasterPage >> >> // will login but I do not know if it is using validation to catch >> unknown credentials >> <asp:Login ID="MemberLogin" runat="server" /> >> >> >> I do not know how to code this anymore because any event handler will >> cause the control to no longer authenticate and login a known user >> >> >> <asp:Login ID="MemberLogin" runat="server" >> OnAuthenticate="OnAuthenticate" /> >> > > That is used for custom authentication only. If you want to do your own > check and then allow normal authentication, then use OnLoggingIn. You can > set e.Cancel = true when it breaks your rules. If you want to do something > after a log in, you can use OnLoggedIn instead. > > > -- > Gregory A. Beamer > MVP; MCP: +I, SE, SD, DBA > > Twitter: @gbworld > Blog: http://gregorybeamer.spaces.live.com > > ******************************************* > | Think outside the box! | > *******************************************
Other interesting topics
Calling Application_Start After Worker Process is Recycled
Gridview render control error in content page Advice required Server.ScriptTimeout not being observed? Javascript question VB.Net Developer, Houstan TX, Duration: 6months, ONLY Green Card / (1-140 & EAD approved) Problems adding HyperLink controls through code. Control is null on postback? DAL for sharing? Refer to Content page from Master page |
|||||||||||||||||||||||