简体   繁体   中英

How to run wpf(c#) application by service account and integrated security

i want to run my WPF aplication with service account...

Maybe i dont understain situation currectlly but i want to use integrated security=true; in my connectionString and run application localy but with different account. Is that even possible?

Lets say my windows login acc is testAcc and my service account is SAtestAcc . SAtestAcc has execute rights on database1 and testAcc doesnt have any on same database1...

So how do i specify in my connectionString that i am trying to connect to database with AStestAcc, but not by specifying username nad password in connectionString but by using integratedSecurity=true .

Again: Is that even possible?

Thanx

Integrated security means that it takes the current security context and uses this. So to appear as another user you would have to authenticate with username and password and use impersonation. Here is a good article on that I have referred to a few times.

http://msdn.microsoft.com/en-us/library/w070t6ka(v=vs.110).aspx

You will need to run the application under the user context of SAtestAcc.

See the below on instructions for how to do this in Windows 7.

http://www.sevenforums.com/tutorials/419-run-different-user.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM