Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CRM 2011 + IFD + ADFS SDK Organization Service Slow

237 views
Skip to first unread message

Rich H

unread,
Mar 7, 2012, 4:50:33 PM3/7/12
to
We have a setup where we have CRM 2011 (with update rollup 6
installed) using IFD and ADFS (2.0 with update rollup 1 installed)
using claims authentication and we are running into issues connecting
to it using the SDK organization service. It seems that the first
time we connect to the service within a thread it can take anywhere
from 7 seconds to 1 minute to connect. Then any other connections to
that service within that thread will take 200ms to 900ms. We changed
our DNS servers around to make sure this connection is happening with
a local ip, but this still doesn't help. It seems we started having
this issue after switching to IFD. Any ideas?

Here is our connection code:

var serviceConfiguration =
ServiceConfigurationFactory.CreateConfiguration<IOrganizationService>(url);
var crmUserResponseWrapper =
serviceConfiguration.Authenticate(userCredentials);
proxy = new OrganizationServiceProxy(serviceConfiguration,
crmUserResponseWrapper);
proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new
ProxyTypesBehavior());

This seems to shave 1 sec off rather than using CrmConnection.

"proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new
ProxyTypesBehavior());" seems to shave an extra second off rather than
using "proxy.EnableProxyTypes();."

Rich H

unread,
Mar 8, 2012, 8:45:36 AM3/8/12
to
I took a closer look at this and I am noticing that this piece of code
is what takes the longest amount of time to execute:
"ServiceConfigurationFactory.CreateConfiguration<IOrganizationService>(url)".

Rich H

unread,
Apr 11, 2012, 8:21:29 AM4/11/12
to
I have made a change to store the proxy in the Session when possible. This has significantly sped up the entire project, but now I had to switch back to a In Process session state opposed to SQL server because the session is not serializable. The real issue comes down to the ADFS connection prior to creating the proxy. Does anybody know of a way to speed up the ADFS connection?
0 new messages