I am working on an ASP.net application. I am trying to execute a process remotely using the System.Diagnostics.Process class
here is my code:
ProcessStartInfo startInfo = new ProcessStartInfo(@"C:\TestCommand.exe");
startInfo.Domain = "myDomain";
startInfo.UserName = "MyUserName";
SecureString sec = new SecureString();
foreach (char item in "MyPassword")
{
sec.AppendChar(item);
}
sec.MakeReadOnly();
startInfo.Password = sec;
startInfo.UseShellExecute = false;
Process.Start(startInfo);
I keep getting an exception with the message "Login failed: unknown username or invalid password." Im absolutelly sure i submit my correct username / pwd
Am I missing something here?
Tks
source
share