S
Sorin Dolha [MCSD .NET]
Hello,
I have an ASP .NET web site (code written in C#), and in one web page's class I wrote code to call the platform function CreateProcessWithLogonW (by interoperating with Windows API) to start an external process and to run it as another user.
The code works great when the site is hosted on my development computer: Windows XP SP1 (all updates applied), IIS 5. However, when I deploy the web site to a test Windows Server 2003 (IIS 6) environment, the external process does not work: the process starts (I can see it running as the required user in the Task Manager window), but an error message: "myapp.exe failed to initialize properly" (error code: c0000142), and then, the process is stopped. The behavior is not process dependent: if I would use cmd.exe or another process instead of myapp.exe, the same would happen: the process starts, but this message appears and then the process is halted.
Myapp.exe functions when it is called from ASP .NET under Windows XP (IIS 5). Also, myapp.exe process does not create any window on the desktop (I know this would cause it not to run properly when started from ASP .NET's process).
Before digging more about this (I didn't found anything in MSDN, so I would need to start searching on the web, whew that will be tough ), I wanted to ask if anyone else from here has already had this problem, and what was the resolution or work-around he or she found. Any other advice would be very appreciated.
Thank you very much,
I have an ASP .NET web site (code written in C#), and in one web page's class I wrote code to call the platform function CreateProcessWithLogonW (by interoperating with Windows API) to start an external process and to run it as another user.
The code works great when the site is hosted on my development computer: Windows XP SP1 (all updates applied), IIS 5. However, when I deploy the web site to a test Windows Server 2003 (IIS 6) environment, the external process does not work: the process starts (I can see it running as the required user in the Task Manager window), but an error message: "myapp.exe failed to initialize properly" (error code: c0000142), and then, the process is stopped. The behavior is not process dependent: if I would use cmd.exe or another process instead of myapp.exe, the same would happen: the process starts, but this message appears and then the process is halted.
Myapp.exe functions when it is called from ASP .NET under Windows XP (IIS 5). Also, myapp.exe process does not create any window on the desktop (I know this would cause it not to run properly when started from ASP .NET's process).
Before digging more about this (I didn't found anything in MSDN, so I would need to start searching on the web, whew that will be tough ), I wanted to ask if anyone else from here has already had this problem, and what was the resolution or work-around he or she found. Any other advice would be very appreciated.
Thank you very much,