locked
crm service RRS feed

  • Question

  •  

    Hi,

    My crm works OK,  but I cannot make CrmService using a program.

    I use the :

    http://MyServer:5555/MSCRMServices/2007/CrmServiceWsdl.aspx

    web reference URL using a code that used to work  on another server and other sample codes which I adjust the

    web reference to my server url.

     

    The line:

    CrmService service = new CrmService();

    ends the program with no error. The service is null.

    (token of autentication and organization are also null).

     

    Is this some kind of problem of server  services configuration or code like web reference, appsettings (though I get no

    erros)?

     

     

    Thanks a lot

    Thursday, October 16, 2008 10:03 AM

All replies

  • What you are trying to do? Send us more details.

    []s

     

    Saturday, October 18, 2008 10:48 PM
  • 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   
    
    Wednesday, October 22, 2008 6:52 AM