来自具有集成安全选项的 Sharepoint 工作流的数据库连接问题 [英] Issue with database connection from sharepoint workflow with integrated security options

查看:40
本文介绍了来自具有集成安全选项的 Sharepoint 工作流的数据库连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家早上好,

我在使用 SharePoint 工作流项目(C#、VS 2008)并连接到数据库.这是我的数据库连接字符串:

I'm running into an issue using a SharePoint workflow project (C#, VS 2008) and connecting to a database. Here is my database connection string:

Data Source=DBSERVER;Initial Catalog=DBNAME;Integrated Security=True; 

当我尝试运行以下代码时,出现以下错误...

When I attempt to run the following code I get the following error ...

SqlConnection dbEngine = new SqlConnection(Constants.DBCONNECTION_STRING);
dbEngine.Open(); 

用户 'DOMAIN\MACHINE_NAME$' 登录失败"

我需要它做的是传递登录用户的凭据.我开启了模拟功能,但它似乎没有通过通过.任何建议将不胜感激.

What I need it to do is pass through the logged in user's credentials. I've got impersonation turned on but it doesn't seem to be passing through. Any suggestions would be very much appreciated.

预先感谢您的任何建议,

Thank you in advance for any advice,

斯科特·维库斯基

推荐答案

出于安全和连接池的原因,任何数据库访问都应作为 Windows 服务帐户运行.

Any DB access should run as a Windows Service account for security and connection pooling reasons.

关于工作流安全上下文,请参阅:

Regarding the Workflow Security Context, see:

SharePoint、工作流和安全性http://cglessner.blogspot.com/2008/09/sharepoint-workflows-and-security.html

SharePoint, Workflows and Security http://cglessner.blogspot.com/2008/09/sharepoint-workflows-and-security.html

声明性工作流和用户上下文 http://blogs.msdn.com/sharepointdesigner/archive/2008/09/28/declarative-workflows-and-user-context.aspx

Declarative Workflows and User Context http://blogs.msdn.com/sharepointdesigner/archive/2008/09/28/declarative-workflows-and-user-context.aspx

SharePoint 中的安全和应用程序开发:第一步工作流程http://www.microsoft.com/technet/community/列/secmvp/sv0408.mspx#EACAC

Security and Application Development in SharePoint: First Steps Workflow http://www.microsoft.com/technet/community/columns/secmvp/sv0408.mspx#EACAC

这篇关于来自具有集成安全选项的 Sharepoint 工作流的数据库连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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