Process.Start in a web service

Discussion in 'ASP .Net Security' started by Josh Buedel, Nov 8, 2003.

  1. Josh Buedel

    Josh Buedel Guest

    When an ASP.NET app calls Process.Start(), is the resulting process run
    under the same user as the ASP.NET app?

    My situation is an ASP.NET app that calls out to an external exe. The
    external exe uses a DSN entry and ends up getting the error "Microsoft][ODBC
    SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not
    associated with a trusted SQL Server connection."

    The call to Process.Start() works perfectly in a non ASP.NET app.

    I do have <identity impersonate="true" userName="DOMAIN\jbuedel"
    password="mypassword" /> in web.config.
    The DSN is set up to use a trusted connection.
    I do have the SQL server set to mixed mode authentication.
    The code "new System.Data.Odbc.OdbcConnection("DSN=JOSHDSN").Open();" did
    not throw an exception when run in the web service (just before the call to
    Process.Start). I believe this means my web service was able to use the
    dsn.
    Process.Start() doesn't throw any security exceptions (before and after
    adding <identity/> to web.config).

    How do I get the security 'context' passed down to the external app?

    Thanks,
    Josh
    Josh Buedel, Nov 8, 2003
    #1
    1. Advertising

  2. the shortest/simplest way to solve this is to create a dummy component in
    COM+ give it the identity you want make it create the process and call it
    form the web service.
    Hnidk







    "Josh Buedel" <=no.com> wrote in message
    news:...
    > When an ASP.NET app calls Process.Start(), is the resulting process run
    > under the same user as the ASP.NET app?
    >
    > My situation is an ASP.NET app that calls out to an external exe. The
    > external exe uses a DSN entry and ends up getting the error

    "Microsoft][ODBC
    > SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not
    > associated with a trusted SQL Server connection."
    >
    > The call to Process.Start() works perfectly in a non ASP.NET app.
    >
    > I do have <identity impersonate="true" userName="DOMAIN\jbuedel"
    > password="mypassword" /> in web.config.
    > The DSN is set up to use a trusted connection.
    > I do have the SQL server set to mixed mode authentication.
    > The code "new System.Data.Odbc.OdbcConnection("DSN=JOSHDSN").Open();" did
    > not throw an exception when run in the web service (just before the call

    to
    > Process.Start). I believe this means my web service was able to use the
    > dsn.
    > Process.Start() doesn't throw any security exceptions (before and after
    > adding <identity/> to web.config).
    >
    > How do I get the security 'context' passed down to the external app?
    >
    > Thanks,
    > Josh
    >
    >
    Khaled M. Hnidk, Nov 9, 2003
    #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. =?Utf-8?B?M2Ry?=
    Replies:
    2
    Views:
    10,899
    Steven Cheng[MSFT]
    Sep 7, 2004
  2. Lucas Tam
    Replies:
    0
    Views:
    482
    Lucas Tam
    Jun 17, 2005
  3. Steve B.
    Replies:
    3
    Views:
    4,020
    Steve B.
    Apr 10, 2006
  4. jpock76
    Replies:
    0
    Views:
    590
    jpock76
    Aug 23, 2010
  5. Leo Violette
    Replies:
    0
    Views:
    990
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page