473,499 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.net Application using Impersonation

I have an application that is using impersonation and when I try to
launch an executable, the executable is started with the
NetworkService account used in the Application Pool identity. My
understanding is that it should launch using the logon account.
Windows 2003, IIS6.0, and ASP.NET 2.0.

Mar 7 '07 #1
2 1334
Under ASP.NET 1.1, running "any.exe" using
Process.Start will always run as the ASP.NET account.

Fortunately, under 2.0, provided you take the necessary steps,
you can run an executable via any account, and even return to
continue executing ASP.NET under your usual account.

See:
http://www.codinghorror.com/blog/archives/000133.html

There's very specific instructions/links there
which will allow you to do what you want to do.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Buck" <bo**********@sentry.comwrote in message
news:11**********************@s48g2000cws.googlegr oups.com...
>I have an application that is using impersonation and when I try to
launch an executable, the executable is started with the
NetworkService account used in the Application Pool identity. My
understanding is that it should launch using the logon account.
Windows 2003, IIS6.0, and ASP.NET 2.0.

Mar 7 '07 #2
On Mar 7, 5:17 pm, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
Under ASP.NET 1.1, running "any.exe" using
Process.Start will always run as the ASP.NET account.

Fortunately, under 2.0, provided you take the necessary steps,
you can run an executable via any account, and even return to
continue executing ASP.NET under your usual account.

See:http://www.codinghorror.com/blog/archives/000133.html

There's very specific instructions/links there
which will allow you to do what you want to do.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
==================================="Buck" <bob.conac...@sentry.comwrote in message

news:11**********************@s48g2000cws.googlegr oups.com...
I have an application that is using impersonation and when I try to
launch an executable, the executable is started with the
NetworkService account used in the Application Pool identity. My
understanding is that it should launch using the logon account.
Windows 2003, IIS6.0, and ASP.NET 2.0.- Hide quoted text -

- Show quoted text -
When I run this on my my Windows XP machine, Notepad will start and
run under the username supplied.
Moved application to Windows 2003 and I get the Access denied error. I
can launch notepad as
the user supplied on the W2K3 machine using run as. It still appears
to me that the process is trying to launch as Network Service????/
I
Dim ArgString, pwd As String
Dim Program As New Process
Program.StartInfo.UserName = "********"
Program.StartInfo.Domain = "*******"
Dim f As SecureString
f = Nothing
f = New SecureString
Dim b As Char
pwd = "12345"
For Each b In pwd.ToCharArray()
f.AppendChar(b)
Next b
Program.StartInfo.Password = f
ID =
System.Security.Principal.WindowsIdentity.GetCurre nt().Name
Program.StartInfo.UseShellExecute = False
Program.StartInfo.FileName = "notepad.exe "
Program.StartInfo.RedirectStandardOutput = True
Program.StartInfo.RedirectStandardError = True
Program.Start()
Program.StandardOutput.ReadToEnd()
Program.WaitForExit(5000)
Program.Close()
Mar 12 '07 #3

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

Similar topics

9
10857
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
6
2030
by: Dean R. Henderson | last post by:
I have a DTS Package I am able to execute successfully from a Windows Form application, but I cannot get this to work from an ASP.NET Web Service, although the Web Service impersonates the same...
1
2183
by: Dean R. Henderson | last post by:
I have a Windows library that I bind into a Windows Form application and into an ASP.NET Web Application. I have a procedure in the library that executes a DTS Package. I have also used...
6
2373
by: Erez Shor | last post by:
Hi, I need to build and asp page which access a remote windows server's registry and create a registry key. In order for the ASP page to be able to access the registry on the remote server I need...
7
1345
by: Bonj | last post by:
Hi I made a naff web application which uses the impersonation method in MSDN (can't find it now, but it basically revolves around creating a token by calling the LogonUser API, calling...
2
2056
by: Johnny Fugazzi | last post by:
I would like to access a network share from my vb.net application. I do not want to map a drive to the share, however. I would also like to specifiy a user credential to use when connecting to...
2
3076
by: Matthias Wohlmann | last post by:
Hi, I'm getting the following error when trying to start my application using Internet Explorer: "Server cannot access application directory D:\xxx. The directory does not exist or is not...
5
20069
by: cooltoriz | last post by:
Hello there, I am not asking how to impersonate a process within C# windows application. I already know that, in C# v2.0, you can easily achieve it using ProcessStartInfo. You can run a process...
7
1145
by: Bolwerk | last post by:
Hello I got a client who uses what appears to be ASP.NET 2.0. I come from a UNIX/PHP/Apache background, and I'm not too familiar with ASP.NET. He had some permissions problem a few weeks ago...
0
7131
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
7007
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
7174
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
7388
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
5470
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,...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
297
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.