G
Guest
Hi
I have created two pages, the login.aspx and the formA.aspx, and each of
this has a corresponding *.cs files for code separation
the scenario is, I seems to be able to login / authenticated because
formA.aspx got loaded. But when I added the following lines
Label1.Text = HttpContext.Current.User.Identity.Name;
to the Page_Load event under FormA.cs, the control Label1 simply not showing
anything!
Do I need to do anything to get the "User.Identity.Name" set? (in config
files and / or after successful login)?
What is the problem here, please?
TIA
____
username and password collected by login.aspx is authenticated against the
AD with LDAP using the following code
//
DirectoryEntry entry = new DirectoryEntry(strPath, uName, pwd);
try
{
// Bind to the native object to force authentication to happen
Object obj = entry.NativeObject;
}
catch (Exception ex)
{
throw new Exception("User authentication failed: " +
ex.Message);
}
Server.Transfer("formA.aspx");
_______
formA.aspx contains a form for user to fill out some information.
--
I have created two pages, the login.aspx and the formA.aspx, and each of
this has a corresponding *.cs files for code separation
the scenario is, I seems to be able to login / authenticated because
formA.aspx got loaded. But when I added the following lines
Label1.Text = HttpContext.Current.User.Identity.Name;
to the Page_Load event under FormA.cs, the control Label1 simply not showing
anything!
Do I need to do anything to get the "User.Identity.Name" set? (in config
files and / or after successful login)?
What is the problem here, please?
TIA
____
username and password collected by login.aspx is authenticated against the
AD with LDAP using the following code
//
DirectoryEntry entry = new DirectoryEntry(strPath, uName, pwd);
try
{
// Bind to the native object to force authentication to happen
Object obj = entry.NativeObject;
}
catch (Exception ex)
{
throw new Exception("User authentication failed: " +
ex.Message);
}
Server.Transfer("formA.aspx");
_______
formA.aspx contains a form for user to fill out some information.
--