- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
CRM 2011 使用 ADFS 和 HTTPS 设置。我正在尝试从自定义网页连接到organization.svc,该网页与CRM 2011位于同一IIS上,但使用以下代码作为不同的网站:
OrganizationServiceProxy serviceProxy;
ClientCredentials clientCredentials = new ClientCredentials();
clientCredentials.UserName.UserName = "admin";
clientCredentials.UserName.Password = "pass";
Guid contactId = Guid.Empty;
Uri OrganizationUri = new Uri(String.Format("https://organization.crmdev.com:port/XRMServices/2011/Organization.svc"));
Uri HomeRealmUri = new Uri(String.Format("https://organization.crmdev.com:port/XRMServices/2011/Discovery.svc"));
using (serviceProxy = new OrganizationServiceProxy(OrganizationUri, null, clientCredentials, null))
{
serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
IOrganizationService service = (IOrganizationService)serviceProxy;
Entity contact = new Entity("contact");
contact.Attributes["lastname"] = "oi oi";
contactId = service.Create(contact);
}
它返回错误消息:
从另一方收到不安全或安全错误的错误。请参阅内部FaultException 了解故障代码和详细信息。ID3242:无法对安全 token 进行身份验证或授权。
在事件查看器中我看到错误:
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: admin
Account Domain:
Failure Reason: Unknown user name or bad password.
虽然我提供了正确的用户名和密码..
如果我尝试替换:
using (serviceProxy = new OrganizationServiceProxy(OrganizationUri, null, clientCredentials, null))
与:
using (serviceProxy = new OrganizationServiceProxy(OrganizationUri, HomeRealUri, clientCredentials, null))
它返回:
未将对象引用设置为对象的实例。
因为 serviceProxy 为空。
最佳答案
所以,我自己刚刚开始使用 ADFS,我建议阅读 Active Directory and Claims-Based Authentication如果您还没有。
另外,通过查看您的代码,我认为您的 HomeRealmUri 不正确。您似乎已向其提供了 CRM Discovery 服务的地址。我认为如果您只使用单个 ADFS,则可以将其保留为空。如 the MSDN here. 中所述
我希望它看起来更像这样:urn:federation:contoso
对于用户名,我相信您需要指定域,通常必须采用以下格式:username@domain
您可能还想看看这个 example它是网页上与 Crm 对话的单一登录,这听起来很像您想要实现的目标。
祝你好运。
关于service - CRM 2011使用C#连接到organization.svc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11849470/
我正在为一个简单的循环而苦苦挣扎: for kernel in ('linear','poly', 'rbf'): svm = svm.SVC(kernel=kernel, C=1)
我正在为一个简单的循环而苦苦挣扎: for kernel in ('linear','poly', 'rbf'): svm = svm.SVC(kernel=kernel, C=1)
我需要在所有资源上使用 VNET 集成,但似乎如果我已经在 app-svc 中使用它,则不需要在应用程序服务计划级别指定它。我在这里缺少什么吗? Web 应用程序工作正常,但我想也许我因为没有在服务计
我需要在所有资源上使用 VNET 集成,但似乎如果我已经在 app-svc 中使用它,则不需要在应用程序服务计划级别指定它。我在这里缺少什么吗? Web 应用程序工作正常,但我想也许我因为没有在服务计
我使用 sklearn.svm.SVC 构建支持向量分类器,如下所示。 import numpy as np from sklearn.svm import SVC svc=SVC(proba
我认为它应该是相同的,但是对于方法 decision_function() 我得到了不同的结果。而只有 decision_function_shape='ovr' 的 SVC 确实更快。 相关:Sci
是否可以设置 Activity 探针来检查是否存在单独的服务?对于一个pod中的一个应用程序以及一个单独的pod中的一个数据库,我希望该app pod检查数据库pod的活跃性,而不是检查此pod本身。
ARM SVC 处理程序以哪种模式启动? 基本上,我想知道引发 SVC 异常时 ARM 内核处于哪种模式? 似乎无法在 ARM ARM 中找到它,但我的猜测是它在 Supervisor 中启动。 最佳
我使用 SVC 文件在 WAS 托管我的服务: 但是如您所见,它没有应有的 CodeBehind Attrbiute。及其工作原理。 怎么样? http://msdn.microsoft.com/e
给定一个以 .svc 结尾且应该运行 SOAP 网络服务的 URL,我如何从中获取一些数据? 我试过: 通过网络浏览器访问它 通过 Python 的库 Zeep 访问它 通过 Microsoft 实用
假设我有一个简单的 aarch64 函数,它通过 SVC 进行系统调用,看起来像这样(iOS 目标): make_syscall: stp fp, lr, [sp, #-16]! ad
我需要将 .svc 文件添加到已添加到解决方案中的 WCF 服务库(这没有 .svc 文件)。如果我通过广告新项目(例如 test.svc)指定此文件,则这是一个安装程序文件,而不是 WCF 文件。
与 asmx 文件相比,如何进入显示服务可用方法的可视化服务页面? http://soweb.adwiza.com/person.asmx 相对 http://soweb7.adwiza.com/re
我正在处理机器学习问题,但我遇到了使用 MultiOutputClassifier 可以运行的类(class)数量限制和 SVC .特别是,当类数> 14 时,拟合失败。我按照 MultiOutput
我有一个 WPF 应用程序,它使用 WCF 服务对使用 EF4 的实体执行操作。 我的项目结构如下: 项目:实体对象 这是 edmx 文件所在的位置 项目:WCFService 引用实体对象 具有对实
我正在尝试在数据集中拟合一个简单的SVC模型。一旦运行代码,就会出现弹出窗口,提示python.exe停止工作。 这是我的代码: Xtrain, Xtest, Ytrain, Ytest = trai
我正在研究 Cortex-M4 上的上下文保存和恢复机制,以便我可以实现简单的多任务处理。我使用 arm-none-eabi-g++ 来编译这段代码。便携性目前不是问题。 当任务可以调用 yield
我正在使用带有线性内核的 SVC 分类器来训练我的模型。列车数据:42000条记录 model = SVC(probability=True) model.fit(self.featu
我下载了数据。 news = datasets.fetch_20newsgroups(subset='all', categories=['alt.atheism', 'sci.space']) ve
我正在使用 SVM 分类器进行多类分类。 我希望 svc.predict 返回结果以及其他类的概率。 我得到的结果是这样的: print(svclassifier.predict([[79,93,60
我是一名优秀的程序员,十分优秀!