I am having a small issue. I am calling a console application from ASP.NET 2.0 website. Below is my code,
string strPassword = Convert.ToString(“Password”);
System.Security.SecureString ssPassword = new System.Security.SecureString();
foreach (char chr in strPassword)
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(“Path of EXE”);
info.UseShellExecute = false;
info.Arguments = “ARGUMENTS”;
info.UserName = Convert.ToString(“UserName”);
info.Password = ssPassword;
info.Domain = Convert.ToString(“Domain”);
Fig – (1) code for calling exe from asp.net
When I run (by pressing F5 from VS) it works fine and console application loads. However once I have deployed the application console application does not load and gives error “Application failed to initialize properly(0xcC000142). Press OK to terminate the application“.
I have used proper credential(Machine’s Admin User Name and Password on which web application is deployed. Console application is on same machine).
Early response is highly appreciated. 🙂