Thursday, March 08, 2012 4:02 PM
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 =
var crmUserResponseWrapper =
proxy = new OrganizationServiceProxy(
This seems to shave 1 sec off rather than using CrmConnection.
ProxyTypesBehavior());" seems to shave an extra second off rather than
Looks like this line is the line that takes the longest to run (about 90% of the total time):"ServiceConfigurationFactory.
Wednesday, April 11, 2012 12:21 PMI 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?
Tuesday, May 15, 2012 7:33 PM
I have a similar issue for an application calling the CRM Web service when IFD and ADFS is enabled. when I disable IFD and claims in CRM updating an account is 4.5x times faster. Did you get any help resolving your issue and optimizing the ADFS speed?
Tuesday, May 15, 2012 7:39 PM
Unfortunately no. What i did to help with the speed is that I made sure the Session in IIS is set to In Process and I store the proxy in the session. I then use jquery.ajax to call to a handler to create the proxy asynchronously (This way it would be stored in the session if this is the first time the session is created, then the person can be entering data while it is loading). I dispose the proxy in the Global.asax when the session ends. I also made a tool to store all the picklists on all entities in an XML file at compile time for faster loading of those dropdowns.
I have narrowed it down to being an ADFS issue. But at least storing the proxy in the session only limits the user to a long load time the first time they access the page through the CRM Endpoints.