473,387 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Run process as another user

I would like to start a process from C# code as another user. The C# code is executed as the ASPNET user because it relies in a Web Page class, and I would like that the process will run as another user to gain the required rights for execution (the external process needs to create a mailbox in Exchange, so it needs to be run as an Exchange Full Administrator-powered user).

For the moment, I have tries using the Start() static method of the Process class (from .NET Framework) to start the new process. However, this way, I cannot impersonate the new process as another user. Therefore I tried to impersonate the execution of the C# web page code by using <identity impersonate="true" userName="..."... /> in the Web.config configuration file of the web site. However, the new process still starts as ASPNET.

To test and dig more, I have tried to configure the <processModel> in my machine.config to impersonate the whole execution of the ASP .NET processes, but the new process (and also aspnet_wp.exe) are still running as the ASPNET (machine) user (that's what TaskManager shows in the Processes tab).

So, I couldn't solve the problem yet and it looks like I will need to dig some more about this, but before doing so, 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]
Nov 18 '05 #1
10 2184
What I would try next would be to interoperate with Windows API's StartProcess() function, which, in a second version, starts a new process using a specified user identity context.

Should I try this "hard" method or is there any other simple way (which I haven't found yet) to do so?

Thank you again,

--
Sorin Dolha [MCAD, MCSD .NET]
"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message news:eJ**************@TK2MSFTNGP12.phx.gbl...
I would like to start a process from C# code as another user. The C# code is executed as the ASPNET user because it relies in a Web Page class, and I would like that the process will run as another user to gain the required rights for execution (the external process needs to create a mailbox in Exchange, so it needs to be run as an Exchange Full Administrator-powered user).

For the moment, I have tries using the Start() static method of the Process class (from .NET Framework) to start the new process. However, this way, I cannot impersonate the new process as another user. Therefore I tried to impersonate the execution of the C# web page code by using <identity impersonate="true" userName="..."... /> in the Web.config configuration file of the web site. However, the new process still starts as ASPNET.

To test and dig more, I have tried to configure the <processModel> in my machine.config to impersonate the whole execution of the ASP .NET processes, but the new process (and also aspnet_wp.exe) are still running as the ASPNET (machine) user (that's what TaskManager shows in the Processes tab).

So, I couldn't solve the problem yet and it looks like I will need to dig some more about this, but before doing so, 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]
Nov 18 '05 #2
Hi Sorin,

I guess you are stuck with interop.
See article Secondary Login from C# by Keith Brown
http://www.develop.com/technology/re...8-ca95edc5730b

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eQ**************@tk2msftngp13.phx.gbl...
What I would try next would be to interoperate with Windows API's
StartProcess() function, which, in a second version, starts a new process
using a specified user identity context.

Should I try this "hard" method or is there any other simple way (which I
haven't found yet) to do so?

Thank you again,

--
Sorin Dolha [MCAD, MCSD .NET]
"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
I would like to start a process from C# code as another user. The C# code is
executed as the ASPNET user because it relies in a Web Page class, and I
would like that the process will run as another user to gain the required
rights for execution (the external process needs to create a mailbox in
Exchange, so it needs to be run as an Exchange Full Administrator-powered
user).

For the moment, I have tries using the Start() static method of the Process
class (from .NET Framework) to start the new process. However, this way, I
cannot impersonate the new process as another user. Therefore I tried to
impersonate the execution of the C# web page code by using <identity
impersonate="true" userName="..."... /> in the Web.config configuration file
of the web site. However, the new process still starts as ASPNET.

To test and dig more, I have tried to configure the <processModel> in my
machine.config to impersonate the whole execution of the ASP .NET processes,
but the new process (and also aspnet_wp.exe) are still running as the ASPNET
(machine) user (that's what TaskManager shows in the Processes tab).

So, I couldn't solve the problem yet and it looks like I will need to dig
some more about this, but before doing so, 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]
Nov 18 '05 #3
Thank you very much, Miha.

--
Sorin Dolha [MCAD, MCSD .NET]
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:el**************@TK2MSFTNGP11.phx.gbl...
Hi Sorin,

I guess you are stuck with interop.
See article Secondary Login from C# by Keith Brown
http://www.develop.com/technology/re...8-ca95edc5730b

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eQ**************@tk2msftngp13.phx.gbl...
What I would try next would be to interoperate with Windows API's
StartProcess() function, which, in a second version, starts a new process
using a specified user identity context.

Should I try this "hard" method or is there any other simple way (which I
haven't found yet) to do so?

Thank you again,

--
Sorin Dolha [MCAD, MCSD .NET]
"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
I would like to start a process from C# code as another user. The C# code is
executed as the ASPNET user because it relies in a Web Page class, and I
would like that the process will run as another user to gain the required
rights for execution (the external process needs to create a mailbox in
Exchange, so it needs to be run as an Exchange Full Administrator-powered
user).

For the moment, I have tries using the Start() static method of the Process
class (from .NET Framework) to start the new process. However, this way, I
cannot impersonate the new process as another user. Therefore I tried to
impersonate the execution of the C# web page code by using <identity
impersonate="true" userName="..."... /> in the Web.config configuration file
of the web site. However, the new process still starts as ASPNET.

To test and dig more, I have tried to configure the <processModel> in my
machine.config to impersonate the whole execution of the ASP .NET processes,
but the new process (and also aspnet_wp.exe) are still running as the ASPNET
(machine) user (that's what TaskManager shows in the Processes tab).

So, I couldn't solve the problem yet and it looks like I will need to dig
some more about this, but before doing so, 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]
Nov 18 '05 #4
This one's directly from msdn:(watch for wrap)

http://msdn.microsoft.com/library/de...onateTopic.asp

Krishnan

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message news:uD**************@TK2MSFTNGP09.phx.gbl...
Thank you very much, Miha.

--
Sorin Dolha [MCAD, MCSD .NET]
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:el**************@TK2MSFTNGP11.phx.gbl...
Hi Sorin,

I guess you are stuck with interop.
See article Secondary Login from C# by Keith Brown
http://www.develop.com/technology/re...8-ca95edc5730b

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eQ**************@tk2msftngp13.phx.gbl...
What I would try next would be to interoperate with Windows API's
StartProcess() function, which, in a second version, starts a new process
using a specified user identity context.

Should I try this "hard" method or is there any other simple way (which I
haven't found yet) to do so?

Thank you again,

--
Sorin Dolha [MCAD, MCSD .NET]
"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
I would like to start a process from C# code as another user. The C# code is
executed as the ASPNET user because it relies in a Web Page class, and I
would like that the process will run as another user to gain the required
rights for execution (the external process needs to create a mailbox in
Exchange, so it needs to be run as an Exchange Full Administrator-powered
user).

For the moment, I have tries using the Start() static method of the Process
class (from .NET Framework) to start the new process. However, this way, I
cannot impersonate the new process as another user. Therefore I tried to
impersonate the execution of the C# web page code by using <identity
impersonate="true" userName="..."... /> in the Web.config configuration file
of the web site. However, the new process still starts as ASPNET.

To test and dig more, I have tried to configure the <processModel> in my
machine.config to impersonate the whole execution of the ASP .NET processes,
but the new process (and also aspnet_wp.exe) are still running as the ASPNET
(machine) user (that's what TaskManager shows in the Processes tab).

So, I couldn't solve the problem yet and it looks like I will need to dig
some more about this, but before doing so, 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]
Nov 18 '05 #5
Krishnan, thank you very much, but I've already used the other sample.

The solution works great when the user who runs the sample code is a "standard" user, but when I try to start the external process from an ASP .NET web page's class (from ASP .NET's internal process) the external process starts (shows up in the Task Manager correctly, running under the correct established user), but it seems to be in a "suspended" state, as no code from the external process is actually executed, and it never ends. The sample code runs ok when I run it from a Windows-based application.

I guess that this new problem occurs because the ASP .NET process does not have an associated desktop, or something like this (I think that this setting is inherited in the new process); however, the external process does not create any window, so, on the other hand, this shouldn't be a problem...

If anyone knows what's the real cause of the problem and/or can help me out with any advice, I will appreciate it very much.

Thank you,

--
Sorin Dolha [MCAD, MCSD .NET]
"Krishnan" <kr*********************@myrealbox.com> wrote in message news:ef**************@TK2MSFTNGP11.phx.gbl...
This one's directly from msdn:(watch for wrap)

http://msdn.microsoft.com/library/de...onateTopic.asp

Krishnan

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message news:uD**************@TK2MSFTNGP09.phx.gbl...
Thank you very much, Miha.

--
Sorin Dolha [MCAD, MCSD .NET]
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:el**************@TK2MSFTNGP11.phx.gbl...
Hi Sorin,

I guess you are stuck with interop.
See article Secondary Login from C# by Keith Brown
http://www.develop.com/technology/re...8-ca95edc5730b

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eQ**************@tk2msftngp13.phx.gbl...
What I would try next would be to interoperate with Windows API's
StartProcess() function, which, in a second version, starts a new process
using a specified user identity context.

Should I try this "hard" method or is there any other simple way (which I
haven't found yet) to do so?

Thank you again,

--
Sorin Dolha [MCAD, MCSD .NET]
"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
I would like to start a process from C# code as another user. The C# code is
executed as the ASPNET user because it relies in a Web Page class, and I
would like that the process will run as another user to gain the required
rights for execution (the external process needs to create a mailbox in
Exchange, so it needs to be run as an Exchange Full Administrator-powered
user).

For the moment, I have tries using the Start() static method of the Process
class (from .NET Framework) to start the new process. However, this way, I
cannot impersonate the new process as another user. Therefore I tried to
impersonate the execution of the C# web page code by using <identity
impersonate="true" userName="..."... /> in the Web.config configuration file
of the web site. However, the new process still starts as ASPNET.

To test and dig more, I have tried to configure the <processModel> in my
machine.config to impersonate the whole execution of the ASP .NET processes,
but the new process (and also aspnet_wp.exe) are still running as the ASPNET
(machine) user (that's what TaskManager shows in the Processes tab).

So, I couldn't solve the problem yet and it looks like I will need to dig
some more about this, but before doing so, 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]
Nov 18 '05 #6
Krishnan,

I've looked into the MSDN sample code for Impersonation and I wanted to state that I have already tried code impersonating (I've already saw and tested this sample code), but this code only sets up a new user for currently executing code in the current process only (for example, if the code in the process tries to access a file, the user who is accessing the file is the impersonated user). However, if I try to start a new process using Process.Start() from inside the code, during active impersonation, the external process does not start as running on the impersonated user, but instead is run under the same account which originally started the sample code. Therefore, I think that this is not the correct solution for my problem.

To better visualize why this code doesn't solve my problem, I'll provide a step-by-step execution diagram below:
a.. User1 starts sample code process
b.. Sample code process is impersonated to User2
c.. Sample code process can access a file as it would be User2
d.. Sample code process uses Process.Start() to run a second process while it still is impersonated to User2: however, second process starts under User1!
--
Sorin Dolha [MCAD, MCSD .NET]
"Krishnan" <kr*********************@myrealbox.com> wrote in message news:ef**************@TK2MSFTNGP11.phx.gbl...
This one's directly from msdn:(watch for wrap)

http://msdn.microsoft.com/library/de...onateTopic.asp

Krishnan

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message news:uD**************@TK2MSFTNGP09.phx.gbl...
Thank you very much, Miha.

--
Sorin Dolha [MCAD, MCSD .NET]
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:el**************@TK2MSFTNGP11.phx.gbl...
Hi Sorin,

I guess you are stuck with interop.
See article Secondary Login from C# by Keith Brown
http://www.develop.com/technology/re...8-ca95edc5730b

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eQ**************@tk2msftngp13.phx.gbl...
What I would try next would be to interoperate with Windows API's
StartProcess() function, which, in a second version, starts a new process
using a specified user identity context.

Should I try this "hard" method or is there any other simple way (which I
haven't found yet) to do so?

Thank you again,

--
Sorin Dolha [MCAD, MCSD .NET]
"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
I would like to start a process from C# code as another user. The C# code is
executed as the ASPNET user because it relies in a Web Page class, and I
would like that the process will run as another user to gain the required
rights for execution (the external process needs to create a mailbox in
Exchange, so it needs to be run as an Exchange Full Administrator-powered
user).

For the moment, I have tries using the Start() static method of the Process
class (from .NET Framework) to start the new process. However, this way, I
cannot impersonate the new process as another user. Therefore I tried to
impersonate the execution of the C# web page code by using <identity
impersonate="true" userName="..."... /> in the Web.config configuration file
of the web site. However, the new process still starts as ASPNET.

To test and dig more, I have tried to configure the <processModel> in my
machine.config to impersonate the whole execution of the ASP .NET processes,
but the new process (and also aspnet_wp.exe) are still running as the ASPNET
(machine) user (that's what TaskManager shows in the Processes tab).

So, I couldn't solve the problem yet and it looks like I will need to dig
some more about this, but before doing so, 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]
Nov 18 '05 #7
Are you sure the other process doesn't create a window? Are you sure it doesn't need a window, like most if not all the ActiveX components or STA type COM servers?

Willy.

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Krishnan, thank you very much, but I've already used the other sample.

The solution works great when the user who runs the sample code is a "standard" user, but when I try to start the external process from an ASP .NET web page's class (from ASP .NET's internal process) the external process starts (shows up in the Task Manager correctly, running under the correct established user), but it seems to be in a "suspended" state, as no code from the external process is actually executed, and it never ends. The sample code runs ok when I run it from a Windows-based application.

I guess that this new problem occurs because the ASP .NET process does not have an associated desktop, or something like this (I think that this setting is inherited in the new process); however, the external process does not create any window, so, on the other hand, this shouldn't be a problem...

If anyone knows what's the real cause of the problem and/or can help me out with any advice, I will appreciate it very much.

Thank you,

--
Sorin Dolha [MCAD, MCSD .NET]

Nov 18 '05 #8

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message news:eW**************@TK2MSFTNGP12.phx.gbl...
Krishnan,

I've looked into the MSDN sample code for Impersonation and I wanted to state that I have already tried code impersonating (I've already saw and tested this sample code), but this code only sets up a new user for currently executing code in the current process only (for example, if the code in the process tries to access a file, the user who is accessing the file is the impersonated user). However, if I try to start a new process using Process.Start() from inside the code, during active impersonation, the external process does not start as running on the impersonated user, but instead is run under the same account which originally started the sample code. Therefore, I think that this is not the correct solution for my problem.

To better visualize why this code doesn't solve my problem, I'll provide a step-by-step execution diagram below:
a.. User1 starts sample code process
b.. Sample code process is impersonated to User2
c.. Sample code process can access a file as it would be User2
d.. Sample code process uses Process.Start() to run a second process while it still is impersonated to User2: however, second process starts under User1!
This behavior is by design, the child process takes the calling process token, not the impersonation token of the calling thread, or in other words, the new process runs in the security context of the calling process.

Willy.

Nov 18 '05 #9
Never mind about the second problem, I have found that the second problem was relying in the way I passed the application executable and command line to the CreateProcess API function. My mistake was that I didn't re-include the application executable file name as the first argument in command line.

I though it was logical to set the application executable file name as the application parameter, and to only set the arguments list in the command line parameter for the API function, but this seems to be wrong, and the process didn't get the correct arguments, therefore shown a messagebox in an invisible deskop inherited from ASP .NET's process... Whew, that was tough!

I appologize for asking about the second problem here and for the time I may have consumed from your thoughts. It was clearly stated in MSDN (as a recommendation only, but hey, we should do it the way they recommend :-)):

If both lpApplicationName and lpCommandLine are non-NULL, *lpApplicationName specifies the module to execute, and *lpCommandLine specifies the command line. The new process can use GetCommandLine to retrieve the entire command line. C runtime processes can use the argc and argv arguments. Note that it is a common practice to repeat the module name as the first token in the command line.

But I din't read it throughtly in the first place, I guess... Sorry again. I hope that this can help other people too.

--
Sorin Dolha [MCAD, MCSD .NET]

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Krishnan, thank you very much, but I've already used the other sample.

The solution works great when the user who runs the sample code is a "standard" user, but when I try to start the external process from an ASP .NET web page's class (from ASP .NET's internal process) the external process starts (shows up in the Task Manager correctly, running under the correct established user), but it seems to be in a "suspended" state, as no code from the external process is actually executed, and it never ends. The sample code runs ok when I run it from a Windows-based application.

I guess that this new problem occurs because the ASP .NET process does not have an associated desktop, or something like this (I think that this setting is inherited in the new process); however, the external process does not create any window, so, on the other hand, this shouldn't be a problem...

If anyone knows what's the real cause of the problem and/or can help me out with any advice, I will appreciate it very much.

Thank you,

--
Sorin Dolha [MCAD, MCSD .NET]
"Krishnan" <kr*********************@myrealbox.com> wrote in message news:ef**************@TK2MSFTNGP11.phx.gbl...
This one's directly from msdn:(watch for wrap)

http://msdn.microsoft.com/library/de...onateTopic.asp

Krishnan

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message news:uD**************@TK2MSFTNGP09.phx.gbl...
Thank you very much, Miha.

--
Sorin Dolha [MCAD, MCSD .NET]
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:el**************@TK2MSFTNGP11.phx.gbl...
Hi Sorin,

I guess you are stuck with interop.
See article Secondary Login from C# by Keith Brown
http://www.develop.com/technology/re...8-ca95edc5730b

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eQ**************@tk2msftngp13.phx.gbl...
What I would try next would be to interoperate with Windows API's
StartProcess() function, which, in a second version, starts a new process
using a specified user identity context.

Should I try this "hard" method or is there any other simple way (which I
haven't found yet) to do so?

Thank you again,

--
Sorin Dolha [MCAD, MCSD .NET]
"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
I would like to start a process from C# code as another user. The C# code is
executed as the ASPNET user because it relies in a Web Page class, and I
would like that the process will run as another user to gain the required
rights for execution (the external process needs to create a mailbox in
Exchange, so it needs to be run as an Exchange Full Administrator-powered
user).

For the moment, I have tries using the Start() static method of the Process
class (from .NET Framework) to start the new process. However, this way, I
cannot impersonate the new process as another user. Therefore I tried to
impersonate the execution of the C# web page code by using <identity
impersonate="true" userName="..."... /> in the Web.config configuration file
of the web site. However, the new process still starts as ASPNET.

To test and dig more, I have tried to configure the <processModel> in my
machine.config to impersonate the whole execution of the ASP ..NET processes,
but the new process (and also aspnet_wp.exe) are still running as the ASPNET
(machine) user (that's what TaskManager shows in the Processes tab).

So, I couldn't solve the problem yet and it looks like I will need to dig
some more about this, but before doing so, 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]
Nov 18 '05 #10
That's ok with me, I just wanted to explained to Krishnan why I couldn't use his or her solution.

--
Sorin Dolha [MCAD, MCSD .NET]
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message news:ed**************@TK2MSFTNGP11.phx.gbl...

"Sorin Dolha [MCSD .NET]" <sd****@hotmail.com> wrote in message news:eW**************@TK2MSFTNGP12.phx.gbl...
Krishnan,

I've looked into the MSDN sample code for Impersonation and I wanted to state that I have already tried code impersonating (I've already saw and tested this sample code), but this code only sets up a new user for currently executing code in the current process only (for example, if the code in the process tries to access a file, the user who is accessing the file is the impersonated user). However, if I try to start a new process using Process.Start() from inside the code, during active impersonation, the external process does not start as running on the impersonated user, but instead is run under the same account which originally started the sample code. Therefore, I think that this is not the correct solution for my problem.

To better visualize why this code doesn't solve my problem, I'll provide a step-by-step execution diagram below:
a.. User1 starts sample code process
b.. Sample code process is impersonated to User2
c.. Sample code process can access a file as it would be User2
d.. Sample code process uses Process.Start() to run a second process while it still is impersonated to User2: however, second process starts under User1!
This behavior is by design, the child process takes the calling process token, not the impersonation token of the calling thread, or in other words, the new process runs in the security context of the calling process.

Willy.

Nov 18 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Strahimir Antoljak | last post by:
Is there a way to find out the name of the user who created a process. Some kind of process property or method that would report the user name how launched it? (but not Environment.UserName) ...
10
by: Sorin Dolha [MCSD .NET] | last post by:
I would like to start a process from C# code as another user. The C# code is executed as the ASPNET user because it relies in a Web Page class, and I would like that the process will run as another...
7
by: Dave Mehrtens | last post by:
I am trying to configure my ASP.NET application and have come across something unexpected. First, I understand that all ASP.NET applications running on a single server will utilize a single...
12
by: Raymond Lewallen | last post by:
How to wait for a process to stop completion is my goal. Obviously, the looping while waiting for the HasExited property is not a solution.. but thats the best I can come up off the top of my...
8
by: Henrik | last post by:
Hi Is there any way to see what the System process is doing? We have developed an application running at a production site to measure and optimize the production. The application needs to be...
1
by: Ralph | last post by:
Okay I have a website where the user is going to hit a button to kick off a process that is going to take a long amount of time. Is there anyway without using AJAX, or possibly a windows control on...
3
by: SugarDaddy | last post by:
Here's my problem. I have an NT service (really a .NET service) running as local system. I have a .NET form running on the user account. The form and the service communicate via an IPC Channel...
0
by: Dominic | last post by:
Every thing work fine when I am not starting process as another user. When I am starting process as another user, the authentication is working (I can see it in my workstation security log), but...
2
by: Kerem Gümrükcü | last post by:
Hi, i have a Process.Start call that fails with 267 Error Code if invoked with another user and password other than the applications user. It is a ordinary piece of code just create a Process...
0
by: Tim Golden | last post by:
aditya shukla wrote: Why on earth are you *specifying* c:\python25 as the directory for this file? It's automatically created in your user-specific temp directory which has specific permissions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.