Process.Start in a web service

J

Josh Buedel

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
 
K

Khaled M. Hnidk

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top