none
CRM 2011 IFD - Problem Connecting to Plugin Registration Tool

    Question

  • Hi guys,

    Was working for a few days on my IFD CRM 2011 deployment, and then, all of a sudden, plugin registration tool stopped working with the following error:

     

    Unhandled Exception: System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.

     

    Server stack trace: 

       at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)

       at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, 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.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(Message message)

       at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)

       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Issue(IssuerEndpoint issuerEndpoint, String appliesTo, String requestType, String keyType, ClientCredentials clientCredentials, SecurityToken securityToken)

       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(TokenServiceCredentialType endpointType, String appliesTo, String keyType, IssuerEndpointDictionary issuerEndpoints, ClientCredentials clientCredentials, SecurityToken securityToken)

       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(TokenServiceCredentialType endpointType, String keyType, ClientCredentials clientCredentials, SecurityToken securityToken)

       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(ClientCredentials clientCredentials)

       at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.AuthenticateCore()

       at PluginRegistrationTool.ManagedTokenDiscoveryServiceProxy.AuthenticateCore() in F:\07. KB\CRM SDK\CRM 2011 5.0.4\sdk\tools\pluginregistration\ToolServiceProxies.cs:line 47

       at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.ValidateAuthentication()

       at PluginRegistrationTool.ManagedTokenDiscoveryServiceProxy.ValidateAuthentication() in F:\07. KB\CRM SDK\CRM 2011 5.0.4\sdk\tools\pluginregistration\ToolServiceProxies.cs:line 53

       at Microsoft.Xrm.Sdk.Client.ServiceContextInitializer`1.Initialize(ServiceProxy`1 proxy)

       at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)

       at PluginRegistrationTool.CrmConnection.RetrieveOrganizations() in F:\07. KB\CRM SDK\CRM 2011 5.0.4\sdk\tools\pluginregistration\CrmConnection.cs:line 315

       at PluginRegistrationTool.ConnectionsForm.OpenConnection(CrmConnection con) in F:\07. KB\CRM SDK\CRM 2011 5.0.4\sdk\tools\pluginregistration\ConnectionsForm.cs:line 940

    Inner Exception: System.ServiceModel.FaultException: ID3242: The security token could not be authenticated or authorized.

     

     

    I searched the web a bit, and tried the solution presented: To resolve this error:

    Go to C:\Users\[Login User ID]\LiveDeviceID folder and delete the LiveDevice.xml file.

     

    It didn't work.

     

    Best Regards,

    Pedro

    Friday, July 22, 2011 11:07 AM

Answers

  • Problem solved, didn't have to do with XML this time, someone had changed a flag in CRM web.config file.

     

    So, don't change the following flag to false. 

    <serviceHostingEnvironment aspNetCompatibilityEnabled=”true”>

    </serviceHostingEnvironment>

     


    • Marked as answer by Pedro Beltrao Friday, July 22, 2011 2:47 PM
    Friday, July 22, 2011 2:46 PM

All replies

  • Just noticed that all my organization service requests in other places (example. REST), also fail with the same error.

     

     

    Friday, July 22, 2011 11:27 AM
  • Hi!

    Have you connected to other environment in the meanwhile? Probably the code is trying the current credentials with the ones stored in the xml and fails.

    Try, in the CrmServiceHelper class, in the GetServerConfiguration() method, to call the DeviceIdManager.RegisterDevice() without params after deleting the LiveDevice.xml file.

    Friday, July 22, 2011 11:30 AM
  • Problem solved, didn't have to do with XML this time, someone had changed a flag in CRM web.config file.

     

    So, don't change the following flag to false. 

    <serviceHostingEnvironment aspNetCompatibilityEnabled=”true”>

    </serviceHostingEnvironment>

     


    • Marked as answer by Pedro Beltrao Friday, July 22, 2011 2:47 PM
    Friday, July 22, 2011 2:46 PM