Hi,
In one ASP.NET site i am using Integrated Windows Authentication and i am using normal users/password for that ( not active directory users ) .
And we want to keep log that how many times user has logged in into the site.
Is there any way we can record/read this log ?
Many Thanks
Prasad . G . Godbole
Prasad GodbolePosted Apr 21, 2008, 7:08 AM
Hi,
Thanks - I will use this code.
Thanks and Regards
Prasad . G . Godbole
Niradhip ChakrabortyPosted Apr 17, 2008, 5:31 PM
Keep the following code on page load where user redirect after logIn.
protected void Page_Load(object sender, EventArgs e)
{
Application.Lock();
if(Application["HitCount"]!=null)
{
Application["HitCount"]=(int)Application["HitCount"]+1;
}
else
{
Application["HitCount"] =1;
}
Application.UnLock();
lblInfo.Text="The page has been accessed ("+Application["HitCount"].ToString()+") times";
}