I have a WorkerRole that just starts another Process as such:
public override void Run()
{
ProcessStartInfo si = new ProcessStartInfo() { FileName = "service.exe", Verb = "runas" };
System.Diagnostics.Process.Start(si);
while (true)
{
Thread.Sleep(10000);
}
}
service.exe is a console app that is hosting a WCF Server instance that I should be able to connect to with my Client portion. This HAS to be a separate Process since its x86 based and uses a 32-bit COM dll. I am following what
Microsoft has in the training course.
I have added the service.exe, service.exe.config, the COM dll and the Interop dll for it to base directory of the project with "Build Action = None" and "Copy to Output Directory = Copy always" along with a batch .cmd file to register the COM component "Register.cmd"
that has the following content:
echo off
regsvr32.exe /s "Engine.dll"
Here is also my app.config for the WorkerRole project with entry to run the Register.cmd on startup
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
name="AzureDiagnostics">
<filter type="" />
</add>
</listeners>
</trace>
</system.diagnostics>
<startup>
<Task commandLine="Register.cmd" executionContext="elevated" taskType="simple" />
</startup>
</configuration>
This all works great in emulator, but fails to deploy with "Application startup task failed with exit code 3." in Azure dashboard in windows.azure.com. It seems like the registration of COM is failing from the message since startup is failing,
but what is wrong?
Any help will be appreciated (What is exit code 3? How can I make sure the script ran successfully, or its the cause? Any way to debug?)
noorbakhsh حميد نوربخش