the application failed to initialize the properly(0xc0000142)

R

rajezh

Sir,
Im using ASP.NET 2.0. In my project, I used ProcessStartInfo
to execute C# .exe console application. It works fine when I run
thorough Visual Studio.But when i run this code
through virtual directory after deploying ( on the same system ) , It
gives the following error
" the application failed to initialize the properly(0xc0000142)". Pls
help me.
I have this error for the past one month.

This is my code. Pls verify it.



System.Diagnostics.ProcessStartInfo myProcess = new
System.Diagnostics.ProcessStartInfo(sPath);

myProcess.UserName =
ConfigurationManager.AppSettings["UserName"];

string pswd =
ConfigurationManager.AppSettings["Password"];
System.Security.SecureString password = new
System.Security.SecureString();
foreach (char c in pswd)
password.AppendChar(c);
myProcess.Password = password;
myProcess.WorkingDirectory =
ConfigurationManager.AppSettings["WorkingDirectory"];
myProcess.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal;

myProcess.Arguments = sArguments;
myProcess.UseShellExecute = false;
System.Diagnostics.Process.Start(myProcess);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top