Hi,
I've got a Assembly that impersonates a user giving other credentials.
When I use the class in a Sharepoint Webpart, it runs like this:
protected void Button1_Click(object sender, System.EventArgs e)
{
//Here always is MyUser
Page.Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name);
//Impersonation method is called here
//And here always is Administrator
Page.Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name);
}
But why when i click Button1 the user is MyUser? I have tested the
impersionation class in ASP.NET 2.0 environment and I don't lost the
impersonated credentials when a postback is made. How can I solve
that? I really need to solve it.
Thak you very much.