crm ifd 用户名和密码

发布于 2024-09-17 04:57:28 字数 704 浏览 3 评论 0原文

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

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);

这要感谢助手:)

i'd like to know how can get the user name and his password and use it when i set the crmservice connection

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);

thanks to the helper :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

耳钉梦 2024-09-24 04:57:30

我假设您正在谈论 IFD 登录页面?您无法从该页面提取用户的凭据。如果您需要用户的凭据,则需要将其拉入自定义页面。

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

CrmDiscoveryService disco = new CrmDiscoveryService();
disco.Url = "https://localhost/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx";
disco.UseDefaultCredentials = true;

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

I'm assuming you're talking about the IFD signin page? There is no way for you to pull the user's credentials from that page. If you need the user's credentials you'll need to pull them in on a custom page.

You can also accomplish the orgrequest using the UseDefaultCredentials property which will use the current user's credentials:

CrmDiscoveryService disco = new CrmDiscoveryService();
disco.Url = "https://localhost/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx";
disco.UseDefaultCredentials = true;

Or you can use an HttpContext/HttpRequest auth if you're doing this on a custom page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文