Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Impersonating a User and Starting Standalone Processes stop workin

Reply
Thread Tools

Impersonating a User and Starting Standalone Processes stop workin

 
 
=?Utf-8?B?SW5kZXB0aA==?=
Guest
Posts: n/a
 
      04-01-2005
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
 
Reply With Quote
 
 
 
 
Bruce Barker
Guest
Posts: n/a
 
      04-01-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C++ 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C Programming 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui Python 0 04-27-2009 12:46 PM
What's dad8.exe and why ain't it workin'? Jim Beaver Computer Support 1 08-03-2006 02:48 AM
Scandisk and Defrag not workin' ...? Morph Computer Support 2 02-12-2005 10:44 PM



Advertisments