locked
CRM 2015 Discovery Service Error RRS feed

  • Question

  • I've just downloaded and installed 2015.

    I am getting an error when trying to install the Outlook plugin, it looked like an issue in the Discovery Service so I tried a Console App I have and the Plugin registration tool.  I appear to get the same issue with them too. 

    I can connect to the service but it errors at the point where I try to retrieve the Organisations.

    From the Plugin Registartion tool log

    Inner Exception Level 1 : 
    Source : System.Runtime.Serialization
    Method : ThrowXmlException
    Date : 03/12/2014
    Time : 16:59:38
    Error : CData elements not valid at top level of an XML document. Line 1, position 3.
    Stack Trace : at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, XmlException exception)
    at System.Xml.XmlUTF8TextReader.Read()
    at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.GetXmlReader(HttpWebResponse response, Int64 maxMessageSize, XmlDictionaryReaderQuotas readerQuotas)
    at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
    at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
    ======================================================================================================================

    Source : mscorlib
    Method : HandleReturnMessage
    Date : 03/12/2014
    Time : 17:00:39
    Error : System.UriFormatException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #55635EDC
    Stack Trace : Server stack trace: 
    at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]: 
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at Microsoft.Xrm.Sdk.Discovery.IDiscoveryService.Execute(DiscoveryRequest request)
    at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
    at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discoveryServiceUri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
    at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.ValidateServerConnection(CrmOrgByServer selectedOrg)
    ======================================================================================================================

    In the Event Log I was getting 

    557fac05-067a-e411-80bb-00155d01070d 
    d432bd51-d4df-47ca-afbc-8eea209d1857 
    none 
    30 
    RetrieveCurrentOrganization 
    Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 
    Microsoft.Crm.Extensibility.InternalOperationPlugin 
    Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values) at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider) at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) Inner Exception: System.UriFormatException: Invalid URI: The hostname could not be parsed. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at Microsoft.Crm.WebServices.OrganizationEndpointProviderFactory.AbstractOrganizationEndpointProvider.GetSdkBaseUrl(Guid organizationId) at Microsoft.Crm.WebServices.OrganizationEndpointProviderBase.GetCrmServiceUrl(Guid organizationId, EndpointVersion version) at Microsoft.Crm.WebServices.OrganizationEndpointProviderBase.GetCrmServiceUrl(Guid organizationId) at Microsoft.Xrm.Sdk.Utility.OrganizationDetails.CreateOrganizationDetail(Guid organizationId, Int32 authenticationType, EndpointProviderRetriever retriever, EndpointAccessType endpointAccessType, ConfigurationProvider provider, LocatorServiceContext locatorServiceContext) at Microsoft.Crm.ObjectModel.OrganizationServiceInternal`1.RetrieveCurrentOrganization(EndpointAccessType endpointAccessType, ExecutionContext context)

    But these didn't always correlate so may be unrelated.

    Further Info:

    Just tried connecting using the CRM Dev tools in Visual Studio.

    I can connect to our 2013 Org no problem but get 'System.UriFormatException' when connecting to the new 2015 one.

    I appear to be getting these, error/Information pairs, in the event log in pairs when the connection fails

    Error:

    The Web Service plug-in failed in OrganizationId: 557fac05-067a-e411-80bb-00155d01070d; SdkMessageProcessingStepId: d432bd51-d4df-47ca-afbc-8eea209d1857; EntityName: none; Stage: 30; MessageName: RetrieveCurrentOrganization; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

      at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

      at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

      at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

      at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)

      at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)

      at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)

      at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)

    Inner Exception: System.UriFormatException: Invalid URI: The hostname could not be parsed.

      at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)

      at Microsoft.Crm.WebServices.OrganizationEndpointProviderFactory.AbstractOrganizationEndpointProvider.GetSdkBaseUrl(Guid organizationId)

      at Microsoft.Crm.WebServices.OrganizationEndpointProviderBase.GetCrmServiceUrl(Guid organizationId, EndpointVersion version)

      at Microsoft.Crm.WebServices.OrganizationEndpointProviderBase.GetCrmServiceUrl(Guid organizationId)

      at Microsoft.Xrm.Sdk.Utility.OrganizationDetails.CreateOrganizationDetail(Guid organizationId, Int32 authenticationType, EndpointProviderRetriever retriever, EndpointAccessType endpointAccessType, ConfigurationProvider provider, LocatorServiceContext locatorServiceContext)

      at Microsoft.Crm.ObjectModel.OrganizationServiceInternal`1.RetrieveCurrentOrganization(EndpointAccessType endpointAccessType, ExecutionContext context)

    Information:

    Fault bucket , type 0

    Event Name: CRMmanaged2

    Response: Not available

    Cab Id: 0

    Problem signature:

    P1: 7.0.0000.3543

    P2: w3wp

    P3: Microsoft.Crm.ObjectModel

    P4: UriFormatException

    P5: GetSdkBaseUrl

    P6: 5B

    P7:

    P8:

    P9:

    P10:

    Any help really appreciated.

    I have tried rebooting, repairing the install and connecting from various tools.

    Also, I had a quick check, we're on-prem and the URLs appear to be OK.  

    I've written a test console app, in that I can connect to the Discovery Service but it errors when I execute a query, I can connect and execute queries on the Organisation Service and the oData Services.

    Thank You

    Monday, January 5, 2015 2:06 PM