本文介绍了CRM 2011:使用_serviceProxy.Authenticate()重新认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用WCF频道和组织服务开发了用于ms dynamics 2011的客户端软件。创建频道后,我将其放入字典 Dictionary< string,OrganizationServiceProxy> 中,等待8个小时后,安全令牌不再有效。现在,我调用 serviceProxy.Authenticate()方法(serviceProxy是从我的集合中检索到的对象),但没有任何反应。我的令牌尚未更新,因此无法使用我的频道从动力学中检索数据。正如我在msdn中所读的那样, Authenticate()方法应该为我提供一个新令牌,我在做什么错了?

I have developed a client software for ms dynamics 2011 using WCF channel and organization service. After creating the channel I put it into dictionary Dictionary<string, OrganizationServiceProxy> and after 8 hours waiting was over, the security token was not valid any more. Now I call serviceProxy.Authenticate() method (serviceProxy is an object retrieved from my collection) and nothing happens. My token has not been renewed and I can not use my channel to retrieve data from dynamics. As I read in msdn, Authenticate() method should deliver me a new token, what am I doing wrong?

推荐答案

您是否尝试过像?

您将找到一个示例,说明如何自动在此类中更新令牌。

You will find an example of how you could automatically renew the token in this classes.

这篇关于CRM 2011:使用_serviceProxy.Authenticate()重新认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 09:46