如何通过服务帐户和集成安全性运行WPF(C#)应用程序 [英] How to run wpf(c#) application by service account and integrated security

查看:59
本文介绍了如何通过服务帐户和集成安全性运行WPF(C#)应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用服务帐户来运行WPF应用程序...

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

也许我现在不了解情况,但是我想使用集成安全性= true; 在我的connectionString中,并使用不同的帐户运行本地应用程序。

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?

让我说我的Windows登录帐户是 testAcc ,而我的服务帐户是 SAtestAcc
SAtestAcc具有对database1的执行权限,而testAcc在同一database1上没有任何权限...

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

所以我如何在我的connectionString中指定我要连接的东西通过在连接字符串中指定用户名 nad 密码使用AStestAcc,但不是到数据库,但使用 integratedSecurity = true

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.

再次:有可能吗?

感谢

推荐答案

集成安全性意味着它将采用当前安全性上下文并使用它。因此,要成为其他用户,您将必须使用用户名和密码进行身份验证并使用模拟。这是一篇我提到过的好文章。

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/zh-CN/library/w070t6ka(v = vs.110).aspx

这篇关于如何通过服务帐户和集成安全性运行WPF(C#)应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆