I am unable to connect . Here is code .
CODE:
OrganizationServiceProxy proxy;
ClientCredentials deviceCredentials = null;
ClientCredentials clientCredentials = null;
Guid contactId = Guid.Empty;
//Organization URL
Uri OrganizationUri = new Uri("crm14.api.crm5.dynamics.com/.../Organization.svc");
//Discovery URL
Uri HomeRealmUri = new Uri("disco.crm5.dynamics.com/.../Discovery.svc");
//Setting Client Credentials
clientCredentials = GetCredentials("kar.ayush@crm14.onmicrosoft.com", "ayush.9255");
//Get the Device Id and Password
deviceCredentials = GetDeviceCredentials();
//Using Organization Service Proxy to instantiate the CRM Web Service
using (proxy = new OrganizationServiceProxy(OrganizationUri, HomeRealmUri, clientCredentials, deviceCredentials))
{
// This statement is required to enable early-bound type support.
proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
IOrganizationService service = (IOrganizationService)proxy;