Thanks for your reply!
I am trying to transfer data from a program to the CRM. It used to work before.
Is there anything on the CRM Server Interface (services/checkbox/properties) that chould have been set to disable communication of the CRM Service? If you know anything on the server that might be related to this, please mention it.
(The Server does show the xml file that contains the crm services on the server. I have a problem only with the service
of the CRM . The discoery service works ok in the program, whilte the crm service terminates the program when there
is attempt to create new crm service. CRM Service does not give any exception).
If you know anything on the server that might be related to this, please mention it.
1 private static string CreateAccount(string organizationName, string accountName)
2 {
3 try
4 {
5 CrmSdk.CrmService myCrm = new CrmSdk.CrmService();
6
7
8
9 myCrm.Url = GetCrmServiceForOrganization(organizationName);
10 CrmSdk.CrmAuthenticationToken myToken = new CrmSdk.CrmAuthenticationToken();
11 myToken.AuthenticationType = 0;
12 myToken.OrganizationName = organizationName;
13 myCrm.CrmAuthenticationTokenValue = myToken;
14 myCrm.Credentials = System.Net.CredentialCache.DefaultCredentials;
15 CrmSdk.account newAccount = new CrmSdk.account();
16 newAccount.name = accountName;
17 Guid newAccountId = myCrm.Create(newAccount);
18 return newAccountId.ToString();
19 }
20 catch (System.Web.Services.Protocols.SoapException soapEx)
21 {
22 Console.WriteLine("SOAP exception: " + soapEx.Detail.InnerText + " " + soapEx.ToString());
23 return "SOAP exception: " + soapEx.Detail.InnerText + " " + soapEx.ToString();
24 }
25 catch (Exception ex)
26 {
27 Console.WriteLine("General exception: " + ex.ToString());
28 return "General exception: " + ex.ToString();
29 }
30 }// end function
31