Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > New process started under ASP .NET - Different behavior in IIS 6

Reply
Thread Tools

New process started under ASP .NET - Different behavior in IIS 6

 
 
Sorin Dolha [MCSD .NET]
Guest
Posts: n/a
 
      03-02-2004
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,

--
Sorin Dolha [MCAD, MCSD .NET]
 
Reply With Quote
 
 
 
 
Abhishek Srivastava
Guest
Posts: n/a
 
      03-02-2004
IIS 6.0 has a concept of worker processes. This is very different from
how IIS 5.0 used to work.

In IIS 6.0 workder processes run under a group called IIS_WPG

So you must edit the security configuration of your server to allow this
group to be able to run processes and be able to read the directory
where the exe is located.

Let me know if this solves the problem.

> would need to start searching on the web, whew that will be tough


Use http://groups.google.com... It always finds right solution to any
technical problem .

Microsoft is giving lot of demos and MSDN free seminars on IIS 6.0 so
try to attend one of those.

regards,
Abhishek.


Sorin Dolha [MCSD .NET] wrote:

> 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,
>
> --
> Sorin Dolha [MCAD, MCSD .NET]

 
Reply With Quote
 
 
 
 
Martin Dechev
Guest
Posts: n/a
 
      03-02-2004
Hi, Sorin Dolha,

It is not the IIS, neither is your code that causes this error. This error
means that the Windows could not execute the binary.

Greetings
Martin
"Sorin Dolha [MCSD .NET]" <(E-Mail Removed)> wrote in message
news:#P0f$(E-Mail Removed)...
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,

--
Sorin Dolha [MCAD, MCSD .NET]


 
Reply With Quote
 
Sorin Dolha [MCSD .NET]
Guest
Posts: n/a
 
      03-02-2004
Abhishek,

Thank you very much for the reply.

I will check it out and come back with details about what happened. I'm not sure, however, what will I need to do to "edit the security configuration" of the server. Do you mean the IIS's MMC configuration window? I will try to find there a place where the worker processes can be configured. (I'm kinda new to Windows Server 2003, I'm sorry if I ask questions with answers that might look very simple for you.)

Thank you again,

--
Sorin Dolha [MCAD, MCSD .NET]
"Abhishek Srivastava" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
IIS 6.0 has a concept of worker processes. This is very different from
how IIS 5.0 used to work.

In IIS 6.0 workder processes run under a group called IIS_WPG

So you must edit the security configuration of your server to allow this
group to be able to run processes and be able to read the directory
where the exe is located.

Let me know if this solves the problem.

> would need to start searching on the web, whew that will be tough


Use http://groups.google.com... It always finds right solution to any
technical problem .

Microsoft is giving lot of demos and MSDN free seminars on IIS 6.0 so
try to attend one of those.

regards,
Abhishek.


Sorin Dolha [MCSD .NET] wrote:

> 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,
>
> --
> Sorin Dolha [MCAD, MCSD .NET]

 
Reply With Quote
 
Sorin Dolha [MCSD .NET]
Guest
Posts: n/a
 
      03-02-2004
Martin,

Thank you very much for the reply. However, as I already stated, the error message appears only when the process is run from withing ASP ..NET. The myApp.exe binary file is running correctly when it is run manually. It also runs correctly when it is run from another test-purpose process (a Windows-based application which starts the external process only to test if it works). Therefore, I think that the binary file is ok. Also as I already stated, the same happens if I change MyApp.exe with Cmd.exe.

--
Sorin Dolha [MCAD, MCSD .NET]
"Martin Dechev" <(E-Mail Removed)> wrote in message news:O8$(E-Mail Removed)...
Hi, Sorin Dolha,

It is not the IIS, neither is your code that causes this error. This error
means that the Windows could not execute the binary.

Greetings
Martin
"Sorin Dolha [MCSD .NET]" <(E-Mail Removed)> wrote in message
news:#P0f$(E-Mail Removed)...
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,

--
Sorin Dolha [MCAD, MCSD .NET]


 
Reply With Quote
 
Sorin Dolha [MCSD .NET]
Guest
Posts: n/a
 
      03-02-2004
Abhishek,

Thank you for your kind advice; I knew about Google's Groups search, but what I meant was that it would have been a little hard for me to find the good keywords to search for, given that I only had these: "IIS 6, ASP .NET, start process, different behavior, c0000142: Application failed to initialize" You know what I mean...

I also didn't look for IIS 6 Help yet, as I was not sure if that the strange behavior I got was by design or by my mistake. However, now, after receiving certain information from you about IIS 6 worker processes group (IIS_WPG) and staff, I can start searching the web too. The "whew" was because I didn't know what to search for...

Thanks again,

--
Sorin Dolha [MCAD, MCSD .NET]
"Abhishek Srivastava" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
Use http://groups.google.com... It always finds right solution to any
technical problem .

Microsoft is giving lot of demos and MSDN free seminars on IIS 6.0 so
try to attend one of those.

regards,
Abhishek.


Sorin Dolha [MCSD .NET] wrote:

> 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,
>
> --
> Sorin Dolha [MCAD, MCSD .NET]

 
Reply With Quote
 
Sorin Dolha [MCSD .NET]
Guest
Posts: n/a
 
      03-02-2004
Abhishek,

I have managed to configure the IIS_WPG users group to have Full rights on the folder containing MyApp.exe, and then restarted IIS and my web site but the behavior didn't change: the application failed to initialize.

Seeing that, I have added IIS_WPG to local Administrators group just to make sure that a process running under an identity from IIS_WPG can do anything (read, or write any file anywhere, start any processes it wants) on the local test computer. The behavior didn't change: the application failed to initialize.

I will, however, try to find the cause of this annoying problem, and if I manage to do that I'll let you know what was it.

--
Sorin Dolha [MCAD, MCSD .NET]
"Abhishek Srivastava" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
IIS 6.0 has a concept of worker processes. This is very different from
how IIS 5.0 used to work.

In IIS 6.0 workder processes run under a group called IIS_WPG

So you must edit the security configuration of your server to allow this
group to be able to run processes and be able to read the directory
where the exe is located.

Let me know if this solves the problem.

> would need to start searching on the web, whew that will be tough


Use http://groups.google.com... It always finds right solution to any
technical problem .

Microsoft is giving lot of demos and MSDN free seminars on IIS 6.0 so
try to attend one of those.

regards,
Abhishek.


Sorin Dolha [MCSD .NET] wrote:

> 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,
>
> --
> Sorin Dolha [MCAD, MCSD .NET]

 
Reply With Quote
 
Abhishek Srivastava
Guest
Posts: n/a
 
      03-02-2004
You said you were using the API call CreateProcessWithLogonW

Can you go into the local security policy, and add IIS_WPG group in "log
on locally" group. Because not only you need permission to read and
execute but to log on as well.

See if that solves the problem.

However, I am afraid that even if this works, we will be creating a
security loophole because ASP.net account should not be allowed to log
on locally....

But just to test.

regards,
Abhishek.
Sorin Dolha [MCSD .NET] wrote:

> Abhishek,
>
> I have managed to configure the IIS_WPG users group to have Full rights
> on the folder containing MyApp.exe, and then restarted IIS and my
> web site but the behavior didn't change: the application failed to
> initialize.
>
> Seeing that, I have added IIS_WPG to local Administrators group just to
> make sure that a process running under an identity from IIS_WPG can do
> anything (read, or write any file anywhere, start any processes it
> wants) on the local test computer. The behavior didn't change: the
> application failed to initialize.
>
> I will, however, try to find the cause of this annoying problem, and if
> I manage to do that I'll let you know what was it.
>
> --
> Sorin Dolha [MCAD, MCSD .NET]
>
> "Abhishek Srivastava" <(E-Mail Removed)
> <(E-Mail Removed)>> wrote in message
> news:(E-Mail Removed)...
> IIS 6.0 has a concept of worker processes. This is very different from
> how IIS 5.0 used to work.
>
> In IIS 6.0 workder processes run under a group called IIS_WPG
>
> So you must edit the security configuration of your server to allow
> this
> group to be able to run processes and be able to read the directory
> where the exe is located.
>
> Let me know if this solves the problem.
>
> > would need to start searching on the web, whew that will be tough

>
> Use http://groups.google.com... It always finds right solution to any
> technical problem .
>
> Microsoft is giving lot of demos and MSDN free seminars on IIS 6.0 so
> try to attend one of those.
>
> regards,
> Abhishek.
>
>
> Sorin Dolha [MCSD .NET] wrote:
>
> > 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,
> >
> > --
> > Sorin Dolha [MCAD, MCSD .NET]

 
Reply With Quote
 
Sorin Dolha [MCSD .NET]
Guest
Posts: n/a
 
      03-02-2004
The log on was not required for IIS_WPG, because the user under who the external process is started is a standard user, with log on rights.

I have managed to figure out a solution for the problem, however. Here it is:

First, I have separated the web page which needed to launch the external process in another web application (for security purposes). Then, I created a new Application Pool in IIS 6, and configured it to run under the required user as its identity. This was there was no need to start a the "myApp" external process under another user, but instead I added the code of "myApp" to the web page class' Page_Load method (luckily that I had the source code and it was a C# application also). The web page then automatically redirects back to the other application so that the user under which ASP .NET is running becomes NETWORK SERVICE again, and the web application continues correctly.

Thank you for all the advice,

--
Sorin Dolha [MCAD, MCSD .NET]
"Abhishek Srivastava" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
You said you were using the API call CreateProcessWithLogonW

Can you go into the local security policy, and add IIS_WPG group in "log
on locally" group. Because not only you need permission to read and
execute but to log on as well.

See if that solves the problem.

However, I am afraid that even if this works, we will be creating a
security loophole because ASP.net account should not be allowed to log
on locally....

But just to test.

regards,
Abhishek.
Sorin Dolha [MCSD .NET] wrote:

> Abhishek,
>
> I have managed to configure the IIS_WPG users group to have Full rights
> on the folder containing MyApp.exe, and then restarted IIS and my
> web site but the behavior didn't change: the application failed to
> initialize.
>
> Seeing that, I have added IIS_WPG to local Administrators group just to
> make sure that a process running under an identity from IIS_WPG can do
> anything (read, or write any file anywhere, start any processes it
> wants) on the local test computer. The behavior didn't change: the
> application failed to initialize.
>
> I will, however, try to find the cause of this annoying problem, and if
> I manage to do that I'll let you know what was it.
>
> --
> Sorin Dolha [MCAD, MCSD .NET]
>
> "Abhishek Srivastava" <(E-Mail Removed)
> <(E-Mail Removed)>> wrote in message
> news:(E-Mail Removed)...
> IIS 6.0 has a concept of worker processes. This is very different from
> how IIS 5.0 used to work.
>
> In IIS 6.0 workder processes run under a group called IIS_WPG
>
> So you must edit the security configuration of your server to allow
> this
> group to be able to run processes and be able to read the directory
> where the exe is located.
>
> Let me know if this solves the problem.
>
> > would need to start searching on the web, whew that will be tough

>
> Use http://groups.google.com... It always finds right solution to any
> technical problem .
>
> Microsoft is giving lot of demos and MSDN free seminars on IIS 6.0 so
> try to attend one of those.
>
> regards,
> Abhishek.
>
>
> Sorin Dolha [MCSD .NET] wrote:
>
> > 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,
> >
> > --
> > Sorin Dolha [MCAD, MCSD .NET]

 
Reply With Quote
 
Sorin Dolha [MCSD .NET]
Guest
Posts: n/a
 
      03-02-2004
The log on was not required for IIS_WPG, because the user under who the external process is started is a standard user, with log on rights.

I have managed to figure out a solution for the problem, however. Here it is:

First, I have separated the web page which needed to launch the external process in another web application (for security purposes). Then, I have created a new Application Pool in IIS 6, and configured it to run under the required user as its identity. After that I configured the new one-page Web Application to run under the new Application Pool.

This was there was no need to start a the "myApp" external process under another user, but instead I added the code of "myApp" to the web page class' Page_Load method (luckily that I had the source code and it was a C# application also). The web page then automatically redirects back to the other application so that the user under which ASP .NET is running becomes NETWORK SERVICE again, and the web application continues correctly.

Thank you for all the advice,

--
Sorin Dolha [MCAD, MCSD .NET]
"Abhishek Srivastava" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
You said you were using the API call CreateProcessWithLogonW

Can you go into the local security policy, and add IIS_WPG group in "log
on locally" group. Because not only you need permission to read and
execute but to log on as well.

See if that solves the problem.

However, I am afraid that even if this works, we will be creating a
security loophole because ASP.net account should not be allowed to log
on locally....

But just to test.

regards,
Abhishek.
Sorin Dolha [MCSD .NET] wrote:

> Abhishek,
>
> I have managed to configure the IIS_WPG users group to have Full rights
> on the folder containing MyApp.exe, and then restarted IIS and my
> web site but the behavior didn't change: the application failed to
> initialize.
>
> Seeing that, I have added IIS_WPG to local Administrators group just to
> make sure that a process running under an identity from IIS_WPG can do
> anything (read, or write any file anywhere, start any processes it
> wants) on the local test computer. The behavior didn't change: the
> application failed to initialize.
>
> I will, however, try to find the cause of this annoying problem, and if
> I manage to do that I'll let you know what was it.
>
> --
> Sorin Dolha [MCAD, MCSD .NET]
>
> "Abhishek Srivastava" <(E-Mail Removed)
> <(E-Mail Removed)>> wrote in message
> news:(E-Mail Removed)...
> IIS 6.0 has a concept of worker processes. This is very different from
> how IIS 5.0 used to work.
>
> In IIS 6.0 workder processes run under a group called IIS_WPG
>
> So you must edit the security configuration of your server to allow
> this
> group to be able to run processes and be able to read the directory
> where the exe is located.
>
> Let me know if this solves the problem.
>
> > would need to start searching on the web, whew that will be tough

>
> Use http://groups.google.com... It always finds right solution to any
> technical problem .
>
> Microsoft is giving lot of demos and MSDN free seminars on IIS 6.0 so
> try to attend one of those.
>
> regards,
> Abhishek.
>
>
> Sorin Dolha [MCSD .NET] wrote:
>
> > 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,
> >
> > --
> > Sorin Dolha [MCAD, MCSD .NET]

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Process.Start... started process not executing any code jpock76 ASP .Net 0 08-23-2010 02:16 PM
Deploying a web service configured under IIS 7 to one under IIS 6 Whiskey Romeo Lima ASP General 1 07-16-2009 01:05 AM
Getting process id of started process Joe Van Dyk Ruby 6 04-02-2005 02:20 PM
Start external Process under different user account in ASP.NET??? Shawn Anderson ASP .Net Security 7 07-14-2004 04:08 AM
Start external Process under different user account in ASP.NET??? Shawn Anderson ASP .Net 7 07-14-2004 04:08 AM



Advertisments