i type the right Username and Password with administrative rights what do u think ?
That is my code
Code
const string file = "cmd.exe";Code
var sspw = new SecureString();Code
foreach (var c in "password")Code
sspw.AppendChar(c);Code
var proc = new Process();Code
proc.StartInfo.UseShellExecute = false;Code
proc.StartInfo.WorkingDirectory = Path.GetDirectoryName(file);Code
proc.StartInfo.FileName = Path.GetFileName(file);Code
proc.StartInfo.Domain = "REMOTEPC";Code
proc.StartInfo.Arguments = "";Code
proc.StartInfo.UserName = "username";Code
proc.StartInfo.Password = sspw;Code
proc.StartInfo.LoadUserProfile = false;Code
proc.Start();
Lucky Laxman92 reputationPosted Jun 4, 2015, 8:48 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Jun 4, 2015, 9:52 PM EDT
This error occurs cuz your sql connection is not properly closed & it leads to max no of open connections. make sure your sql connection object is properly closed.
Restart to your system to release all resource. OR Restart your IIS & sql Server Services.