locked
CRM 2011 - Organization Service not working RRS feed

  • Question

  • Getting the following message in the event log on a regular basis.  Also I can no longer connect with the Pligin Registration Tool.

     

    WebHost failed to process a request.

     

    Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/63835064

     

    Exception: System.ServiceModel.ServiceActivationException: The service '/aspect/XRMServices/2011/OrganizationData.svc' cannot be activated due to an exception during compilation. The exception message is: Value cannot be null.

     

    Parameter name: addresses. ---> System.ArgumentNullException: Value cannot be null.

     

    Parameter name: addresses

     

    at System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses)

     

    at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)

     

    at System.Data.Services.DataServiceHost..ctor(Type serviceType, Uri[] baseAddresses)

     

    at Microsoft.Crm.Extensibility.OrganizationDataServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses)

     

    at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)

     

    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)

     

    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)

     

    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)

     

    --- End of inner exception stack trace ---

     

    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)

     

    at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)

     

    Process Name: w3wp

     

    Process ID: 5400

     

    There was an aborted attempt to toset up HTTPS on the server along with Client Based Authentication but it was undone.  That was a couple of months ago however.  Any ideas on where to llok for a solution?

    Monday, September 19, 2011 8:08 AM

Answers

All replies

  • are you specifying '/aspect/XRMServices/2011/OrganizationData.svc'  If so I think you usually just type in the server name to connect to the plugin registration tool.  I know that I don't usually add the org name.  It lets you pick the org after it connects up.
    Jamie Miley
    Check out my about.me profile!
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Monday, September 19, 2011 2:09 PM
    Moderator
  • The field is Discovery URL and it complains if you leave off the "HTTP://"

    When I specify "HTTP://server" in the discovery URL I get "Unable to retrieve the organisations from the Discovery Service with the trace below:

    Server stack trace: 
       at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
       at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
       at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
       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 PluginRegistrationTool.CrmConnection.RetrieveOrganizations() in D:\CRM 2011 SDK\tools\pluginregistration\CrmConnection.cs:line 360
       at PluginRegistrationTool.ConnectionsForm.OpenConnection(CrmConnection con) in D:\CRM 2011 SDK\tools\pluginregistration\ConnectionsForm.cs:line 940
    Inner Exception: System.ComponentModel.Win32Exception: The Security Support Provider Interface (SSPI) negotiation failed.
       at System.ServiceModel.Security.WindowsSspiNegotiation.GetOutgoingBlob(Byte[] incomingBlob, ChannelBinding channelbinding, ExtendedProtectionPolicy protectionPolicy)
       at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
       at System.ServiceModel.Security.IssuanceTokenProviderBase`1.GetNextOutgoingMessage(Message incomingMessage, T negotiationState)
       at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)

    Slighly different from above.  May be that the error I pasted in above was after trying a few different options.  Sorry about that.  I think the real issue is this one.

    G

    Monday, September 19, 2011 3:14 PM
  • Okay, I've got a bit further.

    I saw a post that reccommended restarting ADFS after adding a new organisation and looking at the logs, it appeared that the errors began when the last org was added.

    To save myself some bother, I restarted the server hosting ADFS.

    No I can get a list of Organisations from the Plugin Registration Tool.

    Strange though, is that the default CrmService URL comes back with HTTPS.  This must be stored in the database somewhere?

    To reiterate:  ADFS was installed but aborted.  In the end I set Claims BAsed Authentication and Internet-Facing Deployment to dispabled.  There is no reference to HTTPS in IIS nor in the Web Config as far as I can see.

    So I am now back to being able to register plugins. 

     

    1. I would like to correct the HTTPS issue though as I guess it will cause problems elsewhere.  Any ideas?

    2. One problem I still have is that my development PC is on a different domain to the CRM server.  When I run some code to insert a Contact I get:

    The caller was not authenticated by the service.
    
    
    
    Stack Trace:
    
    Server stack trace: 
       at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
       at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)
       at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
       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.IOrganizationService.Execute(OrganizationRequest request)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.ExecuteCore(OrganizationRequest request)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Execute(OrganizationRequest request)
       at EBS.CRM.Library.Helpers.EntityHelper.LoadEntityMetadata() in D:\Projects\CRM\v2011\EBS\EBS.CRM.Library\Helpers\Entity\EntityHelper.cs:line 251
       at EBS.CRM.Library.Helpers.EntityHelper..ctor(String EntitySchemaName, IOrganizationService Service) in D:\Projects\CRM\v2011\EBS\EBS.CRM.Library\Helpers\Entity\EntityHelper.cs:line 39
       at EBS.CRM.Library.Helpers.ContactHelper..ctor(IOrganizationService Service) in D:\Projects\CRM\v2011\EBS\EBS.CRM.Library\Helpers\Entity\ContactHelper.cs:line 13
       at EBS.Prospectus.Web.Prospectus.SubmitDetailsToCRM() in D:\Projects\CRM\v2011\EBS\EBS.Prospectus.Web\Prospectus.aspx.cs:line 40
       at EBS.Prospectus.Web.Prospectus.Submit_Click(Object sender, EventArgs e) in D:\Projects\CRM\v2011\EBS\EBS.Prospectus.Web\Prospectus.aspx.cs:line 28
       at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
       at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    
    
    
    Inner Exception Stack Trace
    
       at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target)
       at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)

     

    I am setting the user to the correct CRM user on the CRM Domain.  At this stage I don't know if the problem is that HTTPS is being used somewhere down the call stack OR do I have to do something on the network to allow my code to cross domain boundaries.  Any ideas?


    Tuesday, September 20, 2011 10:01 AM
  • Verify your time settings, I see something about a timespan issue.  This often times is due to the client or server not having the correct time settings.  When the time on each machine is converted to zulu time (GMT +0) both machines must be within 5 minutes of each other.  If one machine is set to autoupdate for daylight savings and the other isn't it can cause this problem too.
    Jamie Miley
    Check out my about.me profile!
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Tuesday, September 20, 2011 3:17 PM
    Moderator
  • Hasn't worked for me so far but I'll do some restarts and try again.

    G

    Tuesday, September 20, 2011 3:48 PM
  • Monday, March 5, 2012 6:32 PM
    Moderator
  • Yes.

    In the end it turned out to be a time clock difference between the server and the clients.

    It was compounded by a network setting which prevented the clocks from being synchronised, resetting various clocks to two different times.

    Tuesday, March 6, 2012 9:12 AM