- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经使用 WCF channel 和组织服务为 ms dynamics 2011 开发了一个客户端软件。创建 channel 后,我将其放入字典 Dictionary<string, OrganizationServiceProxy>
等待 8 小时后,安全 token 不再有效。现在我打电话serviceProxy.Authenticate()
方法(serviceProxy 是从我的集合中检索的对象)并且什么也没有发生。我的 token 尚未更新,我无法使用我的 channel 从动态中检索数据。正如我在 msdn 中看到的,Authenticate()
方法应该给我一个新的 token ,我做错了什么?
最佳答案
您是否尝试过像 Performance Best Practices 中描述的那样监控 token ? ?
In addition, monitor your WCF security token (Token) and refresh it before it expires so that you do not lose the token and have to start over with authentication. To check the token, create a custom class that inherits from the OrganizationServiceProxy or DiscoveryServiceProxy class and that implements the business logic to check the token. Or wrap the proxy classes in a new class. Another technique is to explicitly check the token before each call to the web service. Example code that demonstrates these techniques can be found in the ManagedTokenDiscoveryServiceProxy, ManagedTokenOrganizationServiceProxy, and AutoRefreshSecurityToken classes in the Helper Code: ServerConnection Class topic.
关于wcf - CRM 2011 : Reauthentication with _serviceProxy. 验证(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12258908/
我已经使用 WCF channel 和组织服务为 ms dynamics 2011 开发了一个客户端软件。创建 channel 后,我将其放入字典 Dictionary等待 8 小时后,安全 toke
我是一名优秀的程序员,十分优秀!