I have to save the uploaded document into another local machine. But I was not clear how to use impersonation in my code.
I have used the following code.
protected void btnSave_Click(object sender, EventArgs e)
{
int result = 0,result1=0;
string attachmentpath = "C:\\Documents and Settings\\pr84528\\My Documents\\PRABU\\Tech\\Dot Net\\DocumentManager\\Attachments\\";
....................................................................................
....................................................................................
if(fuDocument.HasFile)
fuDocument.SaveAs(attachmentpath + fuDocument.FileName);
....................................................................................
....................................................................................
}