Re: Accessing network files from an external process
From: avnrao (avn_at_newsgroups.com)
Date: Mon, 10 May 2004 12:54:04 +0530
when you impersonate the logged in user and access some external process,
external process does not run under impersonated user. rather it runs under
the configured identity (ASPNet account).
you need to explicitly impersonate by calling LogonUser.
check the code here :
"Raterus" <firstname.lastname@example.org> wrote in message
Here is a good problem I'm hoping someone can help me with. Let me start
out with my configuration.
I have an asp.net application, integrated windows authentication.
Delegation is set up on my webserver to allow access to remote resources, it
works great from within asp.net.
I'm trying to work in an external command-line program, which will access
files on the network. For this I'm using System.Diagnostics.Process. I'm
positive I've set this up correctly to run the command, but the error I'm
receiving from the program is that it can't open files that I'm setting in
command line parameters. If I run the exact same command w/parameters by
hand, it works great, and I know the files I'm specifying do infact exist.
Sounds like a security problem to me, I have identity impersonate="true"
set, also my Authentication mode is set to "Windows" in web.config.
How can I allow this external process to execute under the same context as
my authenticated user, so this process can access any network files my
asp.net application can?
Thanks for any help!