By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,196 Members | 1,639 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,196 IT Pros & Developers. It's quick & easy.

Impersonating a User and Starting Standalone Processes stop workin

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.