I have a Job with only one step. That step invoke an ETL package (in the same SQL server).
The ETL gets and deletes some data from the database (again, same server), and then it has a Script Task, where I'm invoking a .exe file (a .NET 2005 console application).
I'm doing something like this:
mobjProcess = New Process
mobjProcess.StartInfo.Arguments = String.Format("{0} {1}", iBillingId.ToString(), tUsername)
mobjProcess.StartInfo.FileName = tAppPath
mobjProcess.StartInfo.CreateNoWindow = True
mobjProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
mobjProcess.StartInfo.UseShellExecute = False
mobjProcess.StartInfo.RedirectStandardOutput = True
mobjProcess.StartInfo.WorkingDirectory = Directory.GetParent(tAppPath).FullName
mobjProcess.StartInfo.LoadUserProfile = True
mobjProcess.StartInfo.UserName = tProcessUsername
mobjProcess.StartInfo.Password = objSecureString
mobjProcess.StartInfo.Domain = tProcessDomain
mobjProcess.Start()
tStdOut = mobjProcess.StandardOutput.ReadToEnd()
mobjProcess.WaitForExit()
Now, the problem I'm having is that when I execute that Job from my application, the .exe is not being executed. Everything works fine until the ETL script task step, where I'm invoking the .exe. The jobs keeps running (never ends) and the following message is logged on the Event Log:
Application popup: MiConsoleApp.exe - Application Error : The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.
This was working just fine last month. There may be changes like hotfixes applied on the server. Also, the ETL was imported again (but the same working version as before). But all the code involved is the same as last month.
Any ideas on what could be causing this error?
I also tryed to copy the .exe to another server and it works fine, so the problem must be with the invokation in that particular server...security issues?
I'm using 2005 SQL Server and .NET.
Thanx!!
Bookmarks