dynamics crm - CRM 2016 OrganizationServiceProxy.EnableProxyTypes seems to hang -
we're changing architecture of our end systems , we've discovered need enable proxy types use in codeactivities workflows, using organizationserviceproxy.enableproxytypes method.
however, whenever include method call makes workflow run extremely slow before failing.
here code use call method:
var service = servicefactory.createorganizationservice(context.userid); if (service organizationservice) { tracingservice.trace("enabling proxy types"); ((organizationserviceproxy)((organizationservice)service).innerservice).enableproxytypes(assembly); tracingservice.trace("proxy types enabled"); }
any ideas?
thanks
i've never had pass assembly in parameter enableproxytypes. did try without passing assembly?
also, there's way enable proxy types adding behaviors collection. here's example:
public static iorganizationservice getorganizationservice(guid userid) { clientcredentials credentials = new clientcredentials(); credentials.windows.clientcredential = system.net.credentialcache.defaultnetworkcredentials; uri homerealmuri = null; using (organizationserviceproxy _serviceproxy = new organizationserviceproxy(new uri(getorganizationuri()), homerealmuri, credentials, null)) { _serviceproxy.serviceconfiguration.currentserviceendpoint.behaviors.add(new proxytypesbehavior()); _serviceproxy.callerid = userid; iorganizationservice _service = (iorganizationservice)_serviceproxy; return _service; } }
Comments
Post a Comment