- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我开发了一个使用核心服务的 .Net 库。该库从工作流自动决策的 VBScript 中调用,并使用核心服务来执行与该工作流过程相关的一些事件。
我能够使用我们为 Tridion 提供的服务帐户成功连接到该服务:
CoreServiceClient client = new CoreServiceReference.CoreServiceClient(
binding, endpoint);
client.ChannelFactory.Credentials.Windows.ClientCredential =
new NetworkCredential(serviceAccountUsername, serviceAccountPassword);
client.ChannelFactory.Credentials.Windows.AllowedImpersonationLevel =
System.Security.Principal.TokenImpersonationLevel.Delegation;
相关绑定(bind)属性设置如下:
binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
binding.Security.Transport.ClientCredentialType =
HttpClientCredentialType.Windows;
我遇到的问题是,当我调用核心服务时,我在 CMS 框上收到以下 Tridion 内容管理器错误:
Access is denied for the user NT AUTHORITY\NETWORK SERVICE.
如何配置我的客户端,以便使用 Tridion 服务帐户而不是 NT AUTHORITY\NETWORK SERVICE 执行操作?
最佳答案
如果您想在服务帐户下运行,您可能应该使用 SessionAwareCoreServiceClient
,然后模拟您要使用的帐户。
var client = new SessionAwareCoreServiceClient(binding, endpoint);
client.Impersonate("Administrator");
但由于我的大部分核心服务客户端实际上都打算在不同的机器上运行,所以我不能使用Impersonate
(至少在不引入巨大 安全漏洞),所以我像这样初始化我的客户端:
var client = ...
var credentials = CredentialCache.DefaultNetworkCredentials;
if (!string.IsNullOrWhiteSpace(userName) && !string.IsNullOrWhiteSpace(password))
{
credentials = new NetworkCredential(userName, password);
}
client.ChannelFactory.Credentials.Windows.ClientCredential = credentials;
关于wcf - Tridion CoreService 身份验证/模拟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12044338/
我正在尝试使用以下代码使用 coreservice 创建组件,当我执行 exe 时,出现错误“无法找到 uuid:”“64c7e56a-161d-4698-a76b-7fd96227948d:Cont
我遇到异常 = {"无法找到 uuid:5708986b-390f-4728-b0c7-b49bd3d8f407:元数据。"} schemaId = UpdatePubId(schemaId, con
我正在尝试使用以下代码使用 coreservice 创建组件,当我执行 exe 时,出现错误“无法找到 uuid:”“64c7e56a-161d-4698-a76b-7fd96227948d:Cont
我正在使用 Tridion 2011 SP1 并使用此处的代码连接到 CoreService: http://code.google.com/p/tridion-practice/wiki/GetCo
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
我开发了一个使用核心服务的 .Net 库。该库从工作流自动决策的 VBScript 中调用,并使用核心服务来执行与该工作流过程相关的一些事件。 我能够使用我们为 Tridion 提供的服务帐户成功连接
我编写了一个类来帮助使用核心服务向发布目标添加和删除目的地。目的地通常通过核心服务公开为字符串(带有 XML 内容),因此我围绕它编写了自己的包装器,等等。 我现在遇到的情况是,我需要更新 2 个发布
我正在阅读一篇讨论核心服务的文章,并决定使用其中的一个。我导入核心服务并在 XCode 上添加库,但它不起作用。 示例代码: import Foundation import CoreServices
我的操作系统版本是 10.9.5,我已经安装了 Xcode 版本 6.0.1 (6A317) 安装后首次运行 Xcode 时显示错误弹出消息“/Applications/Xcode/Contents/
我正在重写一个 .NET 后端应用程序,以便它使用 Tridion 2011 CoreService。 有一个部分会在 Tridion 中获取一个使用特定关键字的文件夹。 在当前设置中,这是通过在关键
当我尝试编译任何包含 CoreFoundation、CoreServices 或 CoreGraphics 的东西时,例如 Carbon,我收到以下错误消息。 gcc x.c -framework C
我想编写一个小函数来检查传递的项目对象是否在 Tridion 中结账,如果是,那么它将返回“true”,并且我想使用 Tridion 2011 核心获取已结账该项目的用户的详细信息服务。 我知道我们的
我正在尝试使用 CoreService 2010 Basic HTTP 接口(interface)在 Tridion 中发布单个组件。 使用 Soap UI,我正在发送
当我用g++编译下面的代码时 #include int main(int argc, char ** argv) { return 0; } 我收到这个错误。 bash-3.2$ g++ tes
我在连接到Informatica存储库时遇到以下错误:[PCSF_46008]无法连接到域以查找服务[coReserve vices/UserManagement Service]。。我在服务中重新启
我在连接到Informatica存储库时遇到以下错误:[PCSF_46008]无法连接到域以查找服务[coReserve vices/UserManagement Service]。。我在服务中重新启
我是 iOS 开发的新手,所以我不确定为什么会在此处出现编译错误。希望有人能解释一下。当我导入 CoreServices 时,我在尝试编译时收到以下错误。 Expected declaration s
我的图书馆有一些类型转换器。我正在注册一些 OSX 和 iOS 类型转换器,如下所示: 当我为 iOS 编译时,我收到一些与无法找到 UIKit 相关的错误。这是我为 iOS 编译的方式: xcode
我在 2 天前执行了 gcloud components update 并在运行 dev_appserver.py 时开始出现此错误 (venv) myusername@mymachine:~/pro
我是一名优秀的程序员,十分优秀!