locked
CrmService.asmx returns error RRS feed

  • Question

  • All,

    I am trying to access the CRM web service from my development machine with no luck (link is below).  Instead, I get an error that does not really provide any information on what the issue could be.

    http://localhost:5555/MSCRMServices/2007/CrmService.asmx

    Error
    An error has occurred

    Try this action again.  If the problem continues, check the Microsoft Dynamics
    CRM Community for solutions or contact your organization's Microsoft
    Dynamics Administrator.  Finally, you can contact Microsoft Support.

    Any ideas? 

    Oliver
    Wednesday, March 3, 2010 8:15 PM

Answers

  • Have you already corrected the problem with publishing customizations, as MayankP recommends?  There is a problem with one of your entities, and as a result the Metadata service is failing to compile entity data because of it.  You will be unable to utilize this service until your entity problem is corrected.  To troubleshoot the problem, usually the easiest task is to enable tracing and use the Trace Log Viewer to examine the log files for errors.
    Dave Berry
    Wednesday, March 3, 2010 10:54 PM
    Moderator

All replies

  • I'm sure there must be an issue relating to the port you're communicating with.  Is IIS configured to use "5555" as the served TCP port for the website?  It may not be unless the CRM installation setup a wholly new website within IIS.  Have you been able to access CRM since its installation?
    Dave Berry
    Wednesday, March 3, 2010 8:22 PM
    Moderator
  • David,

    Thanks for your reply.

    I am able to open CRM without any issues.  What is worse (I think), is that I am able to access the MetadataService.

    Best,

    Oliver
    Wednesday, March 3, 2010 8:24 PM
  • check the server event log (or event viewer) and see if it provides more information on the exception..
    Wednesday, March 3, 2010 9:08 PM
  • All,

    Here is the message.  Any help would be greatly appreciated.

    -----

    Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 3/3/2010 4:13:15 PM
    Event time (UTC): 3/3/2010 9:13:15 PM
    Event ID: 1291bca2eaf448328037ba26a7194dbc
    Event sequence: 7
    Event occurrence: 1
    Event detail code: 0  

    Application information:
    Application domain: /LM/W3SVC/2/ROOT-2-129121243739888470
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\Program Files\Microsoft Dynamics CRM\CRMWeb\
    Machine name: VM-3  

    Process information:
    Process ID: 2616
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE  

    Exception information:
    Exception type: InvalidOperationException
    Exception message: Schema item 'element' named 'string' from namespace 'http://schemas.microsoft.com/crm/2007/WebServices'. The global element 'http://schemas.microsoft.com/crm/2007/WebServices:string' has already been declared.  

    Request information:
    Request URL: http://localhost:5555/MSCRMServices/2007/CrmServiceWsdl.aspx
    Request path: /MSCRMServices/2007/CrmServiceWsdl.aspx
    User host address: ::1
    User: DOMAINNAME\obarrera
    Is authenticated: True
    Authentication Type: Negotiate
    Thread account name: NT AUTHORITY\NETWORK SERVICE

    Thread information:
    Thread ID: 4
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False

    Stack trace: at System.Xml.Serialization.XmlSchemas.CreateValidationException(XmlSchemaException exception, String message) at System.Xml.Serialization.XmlSchemas.Compile(ValidationEventHandler handler, Boolean fullCompile) at System.Web.Services.Description.ServiceDescriptionReflector.Reflect(Type type, String url) at Microsoft.Crm.WebServices.AspNetServiceDescriptionCache.AspNetServiceDescriptionLoader.LoadCacheData(AspNetServiceDescriptionCacheKey key, IOrganizationContext context) at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context) at Microsoft.Crm.Caching.CrmMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context)at Microsoft.Crm.WebServices.CrmWebServiceWsdlBase.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesA fterAsyncPoint)

     

     

    Custom event details:

    Wednesday, March 3, 2010 9:21 PM
  • Ok, the important part is this:

    Schema item 'element' named 'string' from namespace 'http://schemas.microsoft.com/crm/2007/WebServices'. The global element 'http://schemas.microsoft.com/crm/2007/WebServices:string' has already been declared.


    There is apparently some error with the XML request sent to the service.  Can you provide the XML you're submitting to this service?
    Dave Berry
    Wednesday, March 3, 2010 9:41 PM
    Moderator
  • Dave,

    I am just attempting to access the url through IE:

    http://localhost:5555/MSCRMServices/2007/CrmService.asmx

    Thanks for your help.

    Oliver
    Wednesday, March 3, 2010 9:46 PM
  • can you publish all CRM entities and see if CRM can publish the entities successfully? i am guessing that there is problem with one of entity which is causing this exception.

    let me know if you are able to publish all entities or not?
    Wednesday, March 3, 2010 9:52 PM
  • Thanks for the suggestion.  I just tried that and it did not work.

    Wednesday, March 3, 2010 10:01 PM
  • I tried adding the service directly to a project to see if there was a chance it would be able to connect.  Instead, I got this error back:

    ----
    The HTML document does not contain Web service discovery information.
    Metadata contains a reference that cannot be resolved: 'http://localhost:5555/mscrmservices/2007/crmservice.asmx'.
    The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.
    The remote server returned an error: (401) Unauthorized.
    If the service is defined in the current solution, try building the solution and adding the service reference again.
    ----

    Does anyone have any suggestions?

    Thanks,

    Oliver

    P.S.  I disabled Anonymous Auth on the CRM site and enabled Windows Auth.
    Wednesday, March 3, 2010 10:14 PM
  • Have you already corrected the problem with publishing customizations, as MayankP recommends?  There is a problem with one of your entities, and as a result the Metadata service is failing to compile entity data because of it.  You will be unable to utilize this service until your entity problem is corrected.  To troubleshoot the problem, usually the easiest task is to enable tracing and use the Trace Log Viewer to examine the log files for errors.
    Dave Berry
    Wednesday, March 3, 2010 10:54 PM
    Moderator
  • David,

    I did not receive any errors publishing entities.  So, I went ahead and re-imported the original customizations and, again, updated them again.  That seems to have enabled me to access the CrmService from my code.  However, I still am unable to access it through IE.

    Not sure what it is, but as long as I my code does what it needs to, I am not overly concerned.

    Thanks all for your input.

    Best,

    Oliver
    Wednesday, March 3, 2010 11:33 PM