0

How can I set a timeout duration for requests crmServiceClient ? this code below didn't work !

// Create an instance
crmServiceClient crmClient = new crmServiceClient(connectionString);

OrganizationServiceProxy serviceProxy = crmClient.OrganizationServiceProxy;

// Set timeout
int timeoutDuration = 600000; // 10 minutes
serviceProxy.Timeout = new TimeSpan(0, 0, 0, 0, timeoutDuration);

// Make requests using the crmServiceClient
Entity testEntity= new Entity("testEntity");
testEntity["name"] = "test";
Guid Id = serviceProxy.Create(testEntity);
Adnane Arharbi
  • 281
  • 1
  • 4
  • 11

0 Answers0