locked
Error Debuggin Web Services in CRM 4.0 RRS feed

  • Question

  • HI,
    When I run the following piece of code, gives the following code

     CreateResponse createResponse = (CreateResponse)service.Execute(createRequest);---> The request failed with HTTP status 503: Service Unavailable

    Best regards, Maria Cunha.
    Monday, June 6, 2011 5:08 PM

Answers

  • So this whole time you have been working on the server huh?  This looks like a DNS resolution problem then that you might be able to fix on the server by just verifying the computer name and then also adding an entry to your host file.  You may want to talk to a network admin about the DNS problem.  But you can get around this in the short term by opening your host file in notepad and editing it using notepad.  Notepad must be openned as administrator

     

    The file is located at:

    C:\Windows\System32\drivers\etc   and the file is just called hosts

     

    just add the following line to your file but don't put a pound sign (#) in front of it and then save the file.  The pound sign in front comments out the line.

     127.0.0.1       win-0jgk5ro1cut

    Try that, the other question then is if you can reach your box name from a different machine?


    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Tuesday, June 7, 2011 2:06 AM
    Moderator

All replies

  • Is your URL pointing to the right place?  Are you setting the url, or what does your  url look like?
    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Monday, June 6, 2011 6:14 PM
    Moderator
  • It looks like this

     

                Microsoft.Crm.SdkTypeProxy.CrmService service = new Microsoft.Crm.SdkTypeProxy.CrmService();

                service.Credentials = new System.Net.NetworkCredential("admin", "MUCZ1HYM@", "isi.local");

                service.Url = "http://win-0jgk5ro1cut:5555" + "/MSCRMServices/2007/CrmService.asmx"; 


    Best regards, Maria Cunha.
    Monday, June 6, 2011 8:37 PM
  • Is this server virtualized.  Like a local dev box or something similiar?  If so you might need to switch your networking to bridged mode for the VM  in order to connect to it.  Try to ping the server to make sure you can ping it.  If not it could be the virtualization thing or it could be a DNS error also.
    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Monday, June 6, 2011 8:45 PM
    Moderator
  • Hi, I've changed my networking to bridge, and i did a ping the server after I saw the Server in ping, but the erros persists.

    I've cheked the pass and user,  and it's ok...

     


    Best regards, Maria Cunha.
    Monday, June 6, 2011 9:16 PM
  • So can you access the web client (access CRM from IE)  from the machine you can't use the web service from when you enter those same credentials.

    secondly, please verify that your particular user has create privileges on your particular entity and is in the privusergroup in Active Directory. (I am guessing this is not the issue but a couple things worth checking.)


    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Monday, June 6, 2011 9:25 PM
    Moderator
  • I access the CRM through IE with the same server, password and user. through IEworks.
    Can be any configuration of Visual Studio?

    Best regards, Maria Cunha.
    Monday, June 6, 2011 9:59 PM
  • So IE works from outside the CRM Server?  I am just trying to make sure I am understanding correctly.

    Visual Studio would work best on the server, but if you are not on the server you can use Visual Studio Remote Debugger to debug plugin code.


    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Monday, June 6, 2011 10:03 PM
    Moderator
  • Here is another issue.  Since you are using web services, remove any time synchronization from your virtualized server that is syncing to the host.  After that, check the date, time, and timezone settings both on the CRM server and on the development server.  Make sure that if you convert the times both to GMT that the time is within 5 minutes or each other.  The bindings for the CRM web services have a restriction in their WCF bindings that require the client and server to be within 5 minutes of each other.
    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Monday, June 6, 2011 10:06 PM
    Moderator
  • in the URL, if I put localhost instead of win-0jgk5ro1cut already works ...
    the problem is, I want to invoke the web service on another PC. And if i put "localhost",  wont' going to conflict?

    Best regards, Maria Cunha.
    Monday, June 6, 2011 10:10 PM
  • So this whole time you have been working on the server huh?  This looks like a DNS resolution problem then that you might be able to fix on the server by just verifying the computer name and then also adding an entry to your host file.  You may want to talk to a network admin about the DNS problem.  But you can get around this in the short term by opening your host file in notepad and editing it using notepad.  Notepad must be openned as administrator

     

    The file is located at:

    C:\Windows\System32\drivers\etc   and the file is just called hosts

     

    just add the following line to your file but don't put a pound sign (#) in front of it and then save the file.  The pound sign in front comments out the line.

     127.0.0.1       win-0jgk5ro1cut

    Try that, the other question then is if you can reach your box name from a different machine?


    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Tuesday, June 7, 2011 2:06 AM
    Moderator
  • Tuesday, February 14, 2012 9:34 PM
    Moderator