首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >crm ifd用户名和密码

crm ifd用户名和密码
EN

Stack Overflow用户
提问于 2010-08-31 19:15:22
回答 1查看 430关注 0票数 0

我想知道在设置crmservice连接时如何获取用户名和密码并使用它们

代码语言:javascript
复制
CrmDiscoveryService disco = new CrmDiscoveryService();
disco.Url = "https://localhost/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx";

//Retrieve a list of available organizations from the CrmDiscoveryService Web service.
RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest();

HERE I WANT TO PUT THE USERNAME AND PASSWORD FROM THE SIGNIN PAGE
// Substitute an appropriate domain, username, and password here.
orgRequest.UserId = domain + "\\" + username;
orgRequest.Password = password;
RetrieveOrganizationsResponse orgResponse = (RetrieveOrganizationsResponse)disco.Execute(orgRequest);

感谢帮手:)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-08-31 23:52:21

我猜你说的是IFD签到页面?您无法从该页面中提取用户的凭据。如果您需要用户的凭据,则需要将其放入自定义页面中。

您还可以使用UseDefaultCredentials属性来完成orgrequest,该属性将使用当前用户的凭据:

代码语言:javascript
复制
CrmDiscoveryService disco = new CrmDiscoveryService();
disco.Url = "https://localhost/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx";
disco.UseDefaultCredentials = true;

或者,如果您在自定义页面上执行此操作,则可以使用HttpContext/HttpRequest auth

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3608426

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档