c# - Dynamics CRM code popping up dialog in service -


given following connection code:

    var serviceuri = "http://machine.co.za/crm/xrmservices/2011/organization.svc";      var clientcredentials = new clientcredentials     {         windows =         {             clientcredential = new system.net.networkcredential("someuser", "somepass", "domain")         }     };     var organizationserviceproxy = new organizationserviceproxy(new uri(serviceuri), null, clientcredentials, null);     // line of code pops dialog?     var user = (whoamiresponse)organizationserviceproxy.execute(new whoamirequest());     if (user.userid == guid.empty)         throw new invalidoperationexception(string.format(@"connection {0} cannot established.", crmconnection.serviceuri));     user.dump(); 

if supplied password incorrect, code pops credentials dialog. since service not have rights interact desktop, service halts cannot show dialog.

how suppress dialog, , have exception thrown instead. using dynamics 2011.

the dialog pops up!

i going take given crm dynamics organizationserviceproxy hardwired pop dialog.

there no configuration options or flags turn behavior off.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -