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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -