sdk - Access Denied Error in calling CRM 2013 Web Service -


i have simple console application test connecting ms dynamics crm. every thing ok ms dynamics crm 2011, calling 2013 or upper, raise "access denied" error. source code is:

static void main(string[] args) {  try             {                 organizationserviceproxy _orgservice;         uri uri = new uri("http://mycrm.mylab.com/xrmservices/2011/organization.svc");                  system.servicemodel.description.clientcredentials clientcredentials = new system.servicemodel.description.clientcredentials();                 clientcredentials.windows.clientcredential = new system.net.networkcredential("myuser@mylab.com", "mypsw", "mylab.com");                  organizationserviceproxy orgservice = new organizationserviceproxy(uri, null, clientcredentials, null);                   queryexpression query = new queryexpression("systemuser");                 query.columnset = new columnset(new string[] { "systemuserid" });                 query.criteria = new filterexpression();                  orgservice.retrievemultiple(query);              }             catch (exception ex)             {              } } 

the username/paswword , security role in both crm 2011 , 2013 same. body can me?

although crm service it's uri reachable, accessing retrive method in code, organizationserviceproxy not possible.

i add organization name uri address: uri uri = new uri("http://mycrm.mylab.com/myorganization/xrmservices/2011/organization.svc");

it works!


Comments

Popular posts from this blog

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

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

html - jQuery UI Sortable - Remove placeholder after item is dropped -