Jump to content
Forum²

kemaltolga

Members
  • Posts

    1
  • Joined

  • Last visited

About kemaltolga

  • Birthday 11/16/1976

kemaltolga's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I am working on a web interface to let users manage their own quotas. Everyting seems to work ok, except for user impersonations. Ather executables, like notepad, run just fine with my code, which is the C# version of *Runas...". But for dirquota I always get "The requested operation requires elevation". Here is my code... String DirQuota = ConfigurationManager.AppSettings["DirQuotaPath"]; String sArgument1 = " template list /remote:\"" + _servername + "\""; System.Security.SecureString password = new System.Security.SecureString(); foreach (char c in sPassword) { password.AppendChar©; } ProcessStartInfo startInfo = new ProcessStartInfo(DirQuota, sArgument1); if (this.chkRunAsLocal.Checked == false) { startInfo.Domain = "xxx"; startInfo.UserName = sUserName; startInfo.Password = password; } startInfo.WindowStyle = ProcessWindowStyle.Minimized; startInfo.CreateNoWindow = true; startInfo.RedirectStandardError = true; startInfo.RedirectStandardOutput = true; startInfo.UseShellExecute = false; Process proc = new Process(); proc.StartInfo = startInfo; proc.Start(); any ideas? thanks --tolga
×
×
  • Create New...