473,509 Members | 2,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running a Process with <impersonate="true">

Hello,

I am trying to run a batch file on a (remote) .NET server (i'm not the
admin) using system.diagnostics.process

I find that the batch file is successfully executed.

However, when i put <identity impersonate="true"/> in my web.config i
get an "access denied" exception.

This line in web.config is required as it was the only way (i have
successfully found) i could also write to a text file from an aspx page.
[ using StreamWriter from system.io ]

I have also tried it with and without <authentication mode="windows">

As far as I understand the impersonate=true makes the "internet guest
account" (machine\IUSR) run the process?

Any solution that would allow me to do both tasks (with or without
impersonation) would be appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 2091
Hi, joeted,

You can set impersonate="true" only for the location of the page that needs
that impersonation. Or set impersonate="false" for the page that starts the
process alternatively.

Have a look at the documentation for the <location> element:

http://msdn.microsoft.com/library/en...ionElement.asp

Hope this helps
Martin
"joeted" <an*******@devdex.org> wrote in message
news:uL*************@TK2MSFTNGP11.phx.gbl...
Hello,

I am trying to run a batch file on a (remote) .NET server (i'm not the
admin) using system.diagnostics.process

I find that the batch file is successfully executed.

However, when i put <identity impersonate="true"/> in my web.config i
get an "access denied" exception.

This line in web.config is required as it was the only way (i have
successfully found) i could also write to a text file from an aspx page.
[ using StreamWriter from system.io ]

I have also tried it with and without <authentication mode="windows">

As far as I understand the impersonate=true makes the "internet guest
account" (machine\IUSR) run the process?

Any solution that would allow me to do both tasks (with or without
impersonation) would be appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
YES!!

This solution works fine and I can now do both tasks within
the same application.

Thanks a bunch, Martin.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

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

Similar topics

1
1804
by: Anton ml. Vaheie | last post by:
How do I convince (what I have to set in asp.net server) that my program that is using <authentication mode="Forms" /> can write to, copy, etc. files in directories on local disk? I have given...
2
439
by: joeted | last post by:
Hello, I am trying to run a batch file on a (remote) .NET server (i'm not the admin) using system.diagnostics.process I find that the batch file is successfully executed. However, when i...
2
7254
by: franzhe | last post by:
Hi all, in a simple ASP.Net application with resources in satellite assemblies I have the following problem: If I set <identity impersonate="true"/>, accessing a culture specific resource...
6
3115
by: Meena Desai | last post by:
Hi, What are the effects of using <identity impersonate="true"/> in web.config on windows auhtentication? Does it affect windows security? Thanx in advance, Meena.
3
5894
by: Raghuram | last post by:
Hi, What is the use of <Identity Impersonate="true" /> How can we implement this in an ASP.NET application When are we supposed to use this. please provide me the details with an Example....
18
4741
by: =?Utf-8?B?VG9t?= | last post by:
is it possible to add a bunch of users to group and only allow group to access the web page or do I need to add each user to the web.config file? Or is there another way to do this? I just took...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7412
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...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.