SharePoint事件接收器在APP池帐户上运行 [英] SharePoint Event Receiver Runs on APP Pool account

查看:54
本文介绍了SharePoint事件接收器在APP池帐户上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,这是我的要求:

Guys, This is my requirement:

我需要将SharePoint列表数据同步更新到SQL表.因此,我创建了一个事件接收器,并且只要用户在SharePoint列表中创建/更新/删除记录,此ER就会更新SQL表记录.

I need to update SharePoint list data to a SQL table synchronously. so i have created an Event receiver and this ER will update SQL table records whenever user creates/updates/deletes a record in the SharePoint list.

代码工作正常,但我想在特定的用户帐户上运行此代码,而不是当前正在使用该代码的APP Pool帐户.我找不到在用户帐户[标准帐户]上运行代码的方法.

Code is working fine but i want to RUN this code on a specific user account rather than APP Pool account which the code is using currently. i could not find a way to run the code on a user account [ a standard account ].

有什么想法吗?让我知道 !!如果您需要查看我的代码.

Any thoughts ? Let me know !! if you need to see my code.

谢谢

推荐答案

该代码将始终在应用程序池帐户的上下文中运行.那是无法改变的.您可能可以修改您连接到SQL的方法,例如在连接字符串中提供一个SQL用户名/密码(如何安全地存储该connstring密码 由您决定).

That code will always run under the context of the App Pool account. That can't be changed. Your approach to connect to SQL might be able to be modified, e.g. supply a SQL username/password in the connection string (how you safely store that connstring password is up to you).

但是最终,向App Pool帐户提供对SQL数据库的适当权限只会更容易.

But ultimately it's just easier to provide the App Pool account with the proper permissions on the SQL database.


这篇关于SharePoint事件接收器在APP池帐户上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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