Impersonating a User and Starting Standalone Processes stop workin

Discussion in 'ASP .Net' started by =?Utf-8?B?SW5kZXB0aA==?=, Apr 1, 2005.

  1. 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
     
    =?Utf-8?B?SW5kZXB0aA==?=, Apr 1, 2005
    #1
    1. Advertisements

  2. =?Utf-8?B?SW5kZXB0aA==?=

    Bruce Barker Guest

    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" <> wrote in message
    news:...
    > 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
     
    Bruce Barker, Apr 1, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raju
    Replies:
    1
    Views:
    1,993
    Rajesh.V
    Oct 29, 2003
  2. =?iso-8859-1?q?Eir=EDkur_Fannar_Torfason?=

    Occasional SecurityException when impersonating a user on a new thread

    =?iso-8859-1?q?Eir=EDkur_Fannar_Torfason?=, May 18, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    540
    =?Utf-8?B?RWlyw61rdXIgRmFubmFyIFRvcmZhc29u?=
    May 18, 2007
  3. kedar

    Impersonating user

    kedar, Sep 12, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    453
    Cowboy \(Gregory A. Beamer\)
    Sep 12, 2007
  4. Jamie

    impersonating windows authenticated user?

    Jamie, Feb 9, 2004, in forum: ASP .Net Security
    Replies:
    5
    Views:
    393
    Ken Schaefer
    Feb 11, 2004
  5. Replies:
    4
    Views:
    366
    Consultant
    Feb 15, 2007
  6. kedar

    Impersonating user

    kedar, Sep 12, 2007, in forum: ASP .Net Security
    Replies:
    4
    Views:
    241
    Dominick Baier
    Sep 14, 2007
  7. CJM

    Impersonating a user in x64

    CJM, Mar 8, 2006, in forum: ASP General
    Replies:
    6
    Views:
    417
  8. Marc Heiler
    Replies:
    1
    Views:
    382
    Robert Klemme
    May 24, 2009
Loading...