473,406 Members | 2,956 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,406 software developers and data experts.

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 2082
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
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
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
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
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
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
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
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
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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,...

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.