Re: Use Form Authentication to control visibility of tag for logged-in users
- From: "Patrick.O.Ige" <naijacoder@xxxxxxxxxxx>
- Date: Sat, 11 Feb 2006 23:08:20 +1100
It looks as if the Context User Idenetity is lost when viewing from
<liuhang@xxxxxxxxx> wrote in message
I'm trying to migrate one of my application written in .NET 1.1 to the
new 2.0, and keep the Form type Authentication for the login part,
which should only show the LogOff tag on the banner to logged-in users.
Currently I'm having problem to show the LogOff tab after valid user
login. It works fine when I browse it using "View In Browser" in my
VS2005, but if i open a new IE and start from localhost, it doesn't
work. The code of the authentication part in my Banner.ascx.vb looks
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim tabItems As New ArrayList
If Request.IsAuthenticated = True Then
' If isAuthenticated add log tab
' add the Log tab (all users can see this tab)
"otherPage.aspx?index=" & tabItems.Count))
tabItems.Add(New TabItem("Help", "ctnHelp.aspx?index="
'Show log off button if user is form authenticated
If Context.User.Identity.AuthenticationType Is "Forms" Then
LogOff.Visible = True
and in my web.config I've included:
<forms name=".ASPXAUTH" protection="All" timeout="60"
Is it related to the configuration of ASP.NET 2.0 security in IIS, and
even cookies? I've searched on Google and still cann't find an answer
so far. Does any of you have idea what the problem could be and how
should I overcome it?
- Prev by Date: Re: Integrated Windows authentiation does not working
- Next by Date: Re: Security exception while opening an OleDBConnection
- Previous by thread: Use Form Authentication to control visibility of tag for logged-in users
- Next by thread: Re: Use Form Authentication to control visibility of tag for logged-in users