Hi,
staticprivateIOrganizationServiceGetOrganisationService(){ClientCredentials credentials =newClientCredentials(); credentials.Windows.ClientCredential=newNetworkCredential("UserName","Password","Domain");OrganizationServiceProxy proxy =newOrganizationServiceProxy(newUri("http://Servername:5555/Organisation/XRMServices/2011/Organization.svc"),null, credentials,null);return proxy asIOrganizationService;}staticpublicvoidMain(){
//Initialize the Organization Service to retrieve CRM Objects
IOrganizationService service = GetOrganisationService();
// Frame the Query with Entity name, Conditions and Columns.QueryExpression query =newQueryExpression("account"); query.ColumnSet=newColumnSet(true);
//Call Retrieve Multiple method to fetch the dataEntityCollection result = service.RetrieveMultiple(query);}
I have to write the above code in my web services But i am unable to connect the crm2011 can u please suugest me.