crm ifd 用户名和密码
我想知道如何获取用户名和密码,并在设置 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您正在谈论 IFD 登录页面?您无法从该页面提取用户的凭据。如果您需要用户的凭据,则需要将其拉入自定义页面。
您还可以使用 UseDefaultCredentials 属性来完成 orgrequest,该属性将使用当前用户的凭据:
或者您可以使用 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:
Or you can use an HttpContext/HttpRequest auth if you're doing this on a custom page.