My question: How can I connect MS CRM2011 service to configuration services?
I’m implementing config services into our applications, which have components in the cloud and on premise, communicating by WCF services. On premise I have business services which access our MS CRM2011 among other applications.
I wanted to add the CRM service as a generic service in the config services. I'm using the IOrganisation-Interface from the CRM SDK. This SDK also provides a CRM proxy with a lot of functionality (security token, credentials …) and has its own channel, which I think I should use to access CRM. So I started to implement the CRM proxy into the LoadbalancingClient in addition to the channel it has now.
I have two problems/challenges:
- In the connectionDictionary I cannot find my service, it is empty. And I cannot find where and when it’s filled. But in the database in the connectedxxx-tables it is configured and it looks correct.
- In the ConfigWeb I see it marked offline, how can I change that? There is no “isOnline” implementation here. Or does it need different configuration or anything?
I hope someone has experiences with this topic. Thanks for answers!
the only advantage of implementing in a WCF client app a "Generic" Connected Service using config services is that you can optionally specify multiple servers (hosts) where the backend service is running, and the included WCF load balancing client will round-robin load balance/implement retry logic across these servers (example--a backend service running on 4 load-balanced Tomcat Java Servers). Also, you can monitor the status of these servers using ConfigWeb (connections page, and service map page). However, for pre-packaged services that do not have an "isOnline" method, you need to specify some simple method (one that does some very simple/fast query, for example) as opposed to "isOnline" as the status checking method. The method needs to take no params, or simple params such as string, int, primitive types which you can also specifiy in configweb. If there is no "isOnline" method, you can also specify none as the online check method, and no status checking will be done and nodes are considered to always be online (I think ConfigWeb should show them as gray icons). If however, you specify isOnline as the status check method, and there is no such method on the host (or otherwise specify an online check method with a mismatched method signature such that request would fail), then on node startup, no connections will be available (hence maybe why your connections dictionary is empty) since on node startup, each cient node uses the online check method to build its channel/connection list, first checking if the backend service host node(s) are actually online--if the online check method fails, no connections will be initialized.
Note you can always implement Config Service in any app, and within this app use your own WCF client logic against backend services without configuring the clients to be monitored/use the Config Service infrastructure. Its just a .NET app, so there is no requirement that WCF clients are managed by Config Service for "Generic" hosts (meaning Web service host apps that do not also implement config services). However, it can be handy to do so if it makes sense for the reasons listed at top of this message.
Greg Leake, Microsoft
Thanks, Greg, for your help. I'll check it out carefully.