I am writing a MVC 3 WebApp which uses XRM 2011 using Early Bound. This is an internet-facing application hosted on separate machine than Dynamics IIS.
This of course makes OrganizationServiceProxy call very very frequently and response is kind of sluggish on every first hit.
Is it advisable to reuse OrganizationServiceProxy connection rather than create new instance every time?
If yes,
Sorry for the duplicate post from MS website. Hopefully this forum is more active.
After few test cycles, I have found that using CrmConection is the fastest method. Compared to above caching implementation, CrmConnection runs at least 5 times faster.
CrmConnection connection = new CrmConnection("XrmConnectionString"); // Todo: Replace magic connection string
using (XrmVRC.XrmVrcServiceContext context = new XrmVRC.XrmVrcServiceContext(connection)) {
// Processing...
}