Ask a Question related to ASP.NET Security, Design and Development.
-
Arulraj Joseph #1
cmd.exe should run in impersonate account.
Hi All,
I am starting a new process from asp.net(cmd.exe). See the following
code,
System.Security.Principal.WindowsImpersonationCont ext
impersonationContext =
((System.Security.Principal.WindowsIdentity)User.I dentity).Impersonate();
ProcessStartInfo oProcessStartInfo = new ProcessStartInfo();
oProcessStartInfo.FileName = "c:\getUser.exe > c:\a.out";
oProcessStartInfo.Arguments = szCommand;
oProcessStartInfo.RedirectStandardOutput = true;
oProcessStartInfo.CreateNoWindow = false;
oProcessStartInfo.UseShellExecute = false;
Process oProcess = new Process();
oProcess.StartInfo = oProcessStartInfo;
oProcess.Start();
oProcess.WaitForExit();
impersonationContext.Undo();
When the process starts, it is running in the aspnet account and not
the impersonate account. How will I run in the impersonate
account(similar
to launching user concept to dcomcnfg.exe).
Note : getuser.exe will output a user name to c:\a.out the code for
getuser.exe is
using System;
namespace getuser
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Console.WriteLine(System.Security.Principal.Window sIdentity.GetCurrent().Name);
}
}
}
Help appreciated.
Thanks,
Arulraj Joseph.
Arulraj Joseph Guest
-
Flash in XP Admin Account not Limited Account
I am running Windows XP Pro & IE 7. I have set up 2 accounts: An Administrator Account and a Limited Account for the family. Flash works when... -
Account Locked Out - Cold Fusion Application Service running as Active Directory Domain Account
Using Cold Fusion 7 Standard w/ IIS6. Cold Fusion Application Service is running as a domain account to access IIS home directory on another... -
Impersonate + AD
Hi, I've got a difficult situation... Is a website that runs on IIS with Anonymous Authentication, the tag <identity impersonate="false"> on the... -
Asp.net impersonate
I don't think impersonation loads the user profile of the account being impersonated. If you think about it, that would make impersonation very... -
DirectoryEntry Impersonate or WindowsIdentity Impersonate?
Another security question. Our project interfaces with the Active Directory. To satisfy the security issues, we have a couple options when we talk...



Reply With Quote

