473,387 Members | 1,899 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.

Impersonating a User and Starting Standalone Processes stop workin

Overview:
We're creating a ASP.NET app in C# that calls some C# programs we've
created. Our DB server is on a w2k3 machine and using our w2k machines as our
web server. Without setting an Identity in the web.config we can not access
the DB on the w2k3 machine at all. So a temporary solution we had was to use
the w2k3 machine as the DB and Web server but this isn't the setup that has
be requested to duplicate.

Problem:
When we set an Identity in the web.config we can access the w2k3 DB but when
we start our offline processes they just sit there and eat up CPU usage and
don't do anything. This happens both when we us w2k and w2k3 as a Web server.
The code we use to call our offline app is:
Process publish = new Process();
publish.StartInfo.FileName = appLocation;
publish.Start();

When we don't impersonate a user in the web.config and run it off the w2k3
machine the offline process run like a charm.

So I'm hoping someone will be able to help with either A) Another technique
for gaining access to the DB on the w2k3 machine or B) Get our processes not
to just sit there and eat up cpu usage and not do a damn thing.

Thanks
--
---------------------------------------
Gene
Software Developer
Nov 19 '05 #1
1 1196
when you create a process and don't specify the login, it the login of the
creating process, not thread, so thread impersonation has no effect. a
couple options:

1) change the account asp.net runs under (see machine.config) to a domain
account
2) use w2k3 and an application pools (simular to above)
3) use CreateProcessAsUser api call to start the process (requires access
name and password)

-- bruce (sqlwork.com)
"Indepth" <In*****@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
Overview:
We're creating a ASP.NET app in C# that calls some C# programs we've
created. Our DB server is on a w2k3 machine and using our w2k machines as
our
web server. Without setting an Identity in the web.config we can not
access
the DB on the w2k3 machine at all. So a temporary solution we had was to
use
the w2k3 machine as the DB and Web server but this isn't the setup that
has
be requested to duplicate.

Problem:
When we set an Identity in the web.config we can access the w2k3 DB but
when
we start our offline processes they just sit there and eat up CPU usage
and
don't do anything. This happens both when we us w2k and w2k3 as a Web
server.
The code we use to call our offline app is:
Process publish = new Process();
publish.StartInfo.FileName = appLocation;
publish.Start();

When we don't impersonate a user in the web.config and run it off the w2k3
machine the offline process run like a charm.

So I'm hoping someone will be able to help with either A) Another
technique
for gaining access to the DB on the w2k3 machine or B) Get our processes
not
to just sit there and eat up cpu usage and not do a damn thing.

Thanks
--
---------------------------------------
Gene
Software Developer

Nov 19 '05 #2

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

Similar topics

1
by: rs035 | last post by:
good morning, everybody i know, it seems more to be a problem according to unix but i got it while developing software with php: i have 2 different users on a hp-ux machine that execute php...
7
by: Yosh | last post by:
I am developing an application that will stop and start a process on a remote machine. What security rights are needed for my application to be able to do this? Hope this makes sense. Yosh
4
by: jas | last post by:
I have a basic client/server socket situation setup....where the server accepts a connection and then waits for commands. On the client side, I create a socket, connect to the server...then I...
0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
7
by: Jason | last post by:
I have an ASP.NET application with forms authentication. However, the login details correspond to a Windows account (I cannot use Windows authentication). If I obtain a token with LogonUser, can I...
6
by: CJM | last post by:
I use the following technique to impersonate a user in ASP, in order to query active directory: http://support.microsoft.com/default.aspx?scid=kb;EN-US;248187 Although the article indicates...
7
by: gel | last post by:
Below is how it is down with vbscript. What is the best way to convert this to python? strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" &...
4
pbmods
by: pbmods | last post by:
Heya. I just installed PHP-Java-Bridge on my system, but I'm having a hard time getting it to stop crashing Apache. When I activate the 'Java.so' module in php.ini, I get the following error in...
10
by: John | last post by:
Hi My app does a few processes and the app can not be closes mid way. Therefore I want to be able to block any attempt of closing app by user such as by clicking on close (cross) or Alt-F4 and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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,...

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.