none
SOAP security negotiation with ‘http://localhost:5555/crm/XRMServices/2011/Organization.svc’ while generating the xrm.cs

    Question

  • I am trying to generate the Xrm.cs file of the CRM, but when i run the command 

    CrmSvcUtil.exe /codeCustom
    ization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Cl
    ient.CodeGeneration" /out:Xrm\Xrm.cs /url:http://<CRM Server>:5555/crm/XRMService
    s/2011/Organization.svc /domain:EFLAB /username:MYLAB/Administrator /password:foo123 /namespace:Xrm /serviceContextName:XrmServiceContext

    It gives me the error 

    Exiting program with exception: SOAP security negotiation with '<CRM SERVER>/crm/XRMServices/2011/Organization.svc' for target '<CRM SERVER>/crm/XRMServices/2011/Organization.svc' failed. See inner exception for more d
    etails.
    Enable tracing and view the trace files for more information.

    Tried THIS ONE too but gives the error i mentioned above
    Help ! 


    Rana Muhammad Waqas



    Wednesday, September 10, 2014 9:47 AM

All replies

  • Hi Waqas,

    OPen the comaand prompt. Navigate to the crm SDK bin folder in command prompt.

    Please use the following command line :

    crmsvcutil.exe /l:cs /url:http://ipaddress/demo1/XrmServices/2011/Organization.svc /o:Xrm.cs /n:Xrm /u:username /p:password /d:domainname /serviceContextName:XrmServiceContext /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration"

    Replace Ip address with your crm server Ip address and demo1 to your CRM organisation name. User name Password and Domain Name in the above command line.

    this will generate XRM.cs file in the same folder.

    Let me know if you face any Issue.

    Wednesday, September 10, 2014 1:54 PM
  • when you specify the domain parameter, the username parameter needs to be only the username without the domain

    My blog: www.crmanswers.net - Rockstar 365 Profile

    Wednesday, September 10, 2014 1:57 PM
  • Yes i Removed the domain name from the user name but now it gives me the Timeout error after sometime or it crash the CrmSvcUtil.exe

    So what do I do to fix this ? 


    Rana Muhammad Waqas

    Wednesday, September 10, 2014 2:07 PM
  • Hi Waqas,

    Please check whether your user is able to access organisation service url.

    Saad

    Wednesday, September 10, 2014 2:21 PM
  • How do i check that ? 
    If you mean can I access CRM on browser ? it is yes i can its doing its job fine 

    I am running it on port 5555 changed it binding thats what i give in the url  <IP>:5555


    Rana Muhammad Waqas

    Wednesday, September 10, 2014 2:24 PM
  • And Yes if I run the url from the code

    http://<CRM Server>:5555/crm/XRMService

    It does run and shows me this 

     

    Rana Muhammad Waqas


    Wednesday, September 10, 2014 2:39 PM