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. Advertising

  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. Advertising

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. nyenyec
    Replies:
    3
    Views:
    1,028
    Duncan Booth
    Jan 7, 2007
  2. triplejump24
    Replies:
    3
    Views:
    939
  3. Sukeerthi Adiga

    :true not workin!

    Sukeerthi Adiga, Feb 27, 2008, in forum: Ruby
    Replies:
    1
    Views:
    87
    Andreas Kleindiek
    Feb 27, 2008
  4. J. Hall
    Replies:
    8
    Views:
    124
    kaeli
    Jul 14, 2004
  5. Replies:
    3
    Views:
    93
    Thomas 'PointedEars' Lahn
    Dec 17, 2005
Loading...

Share This Page