Hi all.
I have an intranet under Win2000 with windows XP clients.
My intranet works with authentication mode="Windows", under a domain,
so active directory manage the accounts.
Now I need to connect to other server that has one citrix metaframe
system, in order to access some aplications with its tecnology.
I have readed some examples of how I can make an aspx page to ask for
user and password, and pass it to the citrix system across the page, in
order to validate in the citrix system.
But I need one step more: I want to automatically pass the windows user
to the citrix system, saving the user to re-validate in the citrix
system.
I know the windows user with HttpContext.Cur rent.User.Ident ity.Name,
but I dont know how I can pass the password, because it is not in the
Identity property.
¿Some one can help me? Thanks. I can put some
Here is the example code for login in citrix, asking user for username,
domain(optional ) and password (there are 3 textboxes):
private void LoginButton_Cli ck(object sender, System.EventArg s e)
{
// Validate the credentials
AccessToken credentials = new UserDomainPassw ordCredentials
(
UsernameTextBox .Text,
DomainTextBox.T ext,
PasswordTextBox .Text
);
WebPN webPN = (WebPN)Applicat ion["WebPN"];
AccessTokenVali dationResult result =
webPN.checkAcce ssToken(credent ials);
if (result.isSucce ss())
{
// Credentials successfully validated
// Save away the token in the session state, and redirect to
application list page
Session["AccessToke n"]=credentials;
Response.Redire ct("applist.asp x");
}
else
{
// Credentials were not valid
// Destroy built-up session state, and redirect to an error page
Session.Abandon ();
StatusLabel.Tex t= "Invalid credentials";
}
}
Manuel Conde