Answered by:
Plugin registration tool problem

Question
-
hi all,
when am trying to connect to my online crm from plugin registration tool, am getting the following error.
sample url:https://yyy.crm5.dynamics.com
username:xxx@yyy.onmicrosoft.com
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.Dispatcher.RequestChannelBinder.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.AuthenticateLiveIdInternal(ClientCredentials clientCredentials, SecurityTokenResponse deviceToken, String keyType)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateDevice(ClientCredentials clientCredentials)
at Microsoft.Xrm.Sdk.Client.DiscoveryServiceConfiguration.AuthenticateDevice(ClientCredentials clientCredentials)
at PluginRegistrationTool.AutoRefreshSecurityToken`2.AuthenticateDevice()
at PluginRegistrationTool.ManagedTokenDiscoveryServiceProxy.AuthenticateDeviceCore()
at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.AuthenticateCore()
at PluginRegistrationTool.ManagedTokenDiscoveryServiceProxy.AuthenticateCore()
at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.Authenticate()
at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.ValidateAuthentication()
at PluginRegistrationTool.ManagedTokenDiscoveryServiceProxy.ValidateAuthentication()
at Microsoft.Xrm.Sdk.Client.ServiceContextInitializer`1.Initialize(ServiceProxy`1 proxy)
at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
at PluginRegistrationTool.CrmConnection.RetrieveOrganizations()
at PluginRegistrationTool.ConnectionsForm.OpenConnection(CrmConnection con)
Inner Exception: System.ServiceModel.FaultException: Authentication FailureFriday, August 31, 2012 7:33 AM
Answers
-
Hello,
I have already seen this issue and answer is:
1. Download the lates SDK.
2. Remove references from your plugin registration tool to old SDK assembles and add references to new SDK assemblies.
3. Rebuild your plugin registration tool.
4. Enjoy.
- Proposed as answer by _Vikram Tuesday, September 4, 2012 12:15 PM
- Marked as answer by Andrii ButenkoMVP, Moderator Tuesday, September 4, 2012 1:14 PM
Tuesday, September 4, 2012 12:11 PMModerator
All replies
-
Hi Naveen,
During creation of new connection in plugin registration tool, follow these steps:
1. provide any label: e.g. "testconnection"
2. Discovery Url field, mention the discovery Url path which is incorrect in your case. It will be of the format:
https://disco.crm5.dynamics.com
you can verify this url in crm application --> Settings --> Customizations --> Developer Resources -->Service Endpoints --> discovery Service
3. mention your user name xxx@yyy.onmicrosoft.com
4. Click on connect, enter your password and you should be connected.
Hope this resolves your problem.
Thanks.
Friday, August 31, 2012 7:59 AM -
hi,
I have tried it, but still am getting the same error.
Friday, August 31, 2012 8:23 AM -
Install Windows Identification Foundation(WIF) in your system.. then
to make sure there is no Authentication Error..put user name as domainname\username ex nike\vinodkumar.s and password
If this dosen't work..try recompile the Plugin Reg tool
Contact["name"] = "Vin.k.s"; If it helps, Mark as answer to help others..
- Edited by ViN.k.S Friday, August 31, 2012 8:31 AM update
Friday, August 31, 2012 8:26 AM -
Hi Naveen,
The error that you got is received when the tool is not able to identify the correct discovery service and tries to authenticate with the credentials that you provide. I would suggest if you can re-run your tool and create a new connection with the discovery url as mentioned in the CRM application.
Thanks,
Friday, August 31, 2012 8:30 AM -
Hi Naveen,
The error that you got is received when the tool is not able to identify the correct discovery service and tries to authenticate with the credentials that you provide. I would suggest if you can re-run your tool and create a new connection with the discovery url as mentioned in the CRM application.
Thanks,
Did you get any success?Friday, August 31, 2012 2:44 PM -
- Proposed as answer by _Vikram Friday, August 31, 2012 5:08 PM
Friday, August 31, 2012 4:09 PM -
Hi Navin,
Make sure you have deleted Livedevice.xml file before connecting to service.
You can find it on c:/users/{yourusername}/livedevice.xml
Thanks and regards,
Hiren Solanki.
Please vote or mark as a answer if it helped you.Friday, August 31, 2012 4:41 PM -
Am Struck with this same issue.
i have deleted the livedevice.xml.
i have added the disco service as https://disco.crm5.dynamics.com
I'm providing my onmicrosoft user account as the login id.
still getting the same error..
Any help is appreciated.
Tuesday, September 4, 2012 12:03 PM -
Infact, i'm getting this error:
Unhandled Exception: Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationException: ID3011: Unrecognized RequestType specified: 'http://schemas.xmlsoap.org/ws/2005/02/trust/Issue'
Server stack trace:
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteRequestType(XmlWriter writer, String requestType, WSTrustConstantsAdapter trustConstants)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteRSTXml(XmlWriter writer, String elementName, Object elementValue, WSTrustSerializationContext context, WSTrustConstantsAdapter trustConstants)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13RequestSerializer.WriteXmlElement(XmlWriter writer, String elementName, Object elementValue, RequestSecurityToken rst, WSTrustSerializationContext context)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteKnownRequestElement(RequestSecurityToken rst, XmlWriter writer, WSTrustSerializationContext context, WSTrustRequestSerializer requestSerializer, WSTrustConstantsAdapter trustConstants)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13RequestSerializer.WriteKnownRequestElement(RequestSecurityToken rst, XmlWriter writer, WSTrustSerializationContext context)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteRequest(RequestSecurityToken rst, XmlWriter writer, WSTrustSerializationContext context, WSTrustRequestSerializer requestSerializer, WSTrustConstantsAdapter trustConstants)
at Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13RequestSerializer.WriteXml(RequestSecurityToken request, XmlWriter writer, WSTrustSerializationContext context)
at System.ServiceModel.Channels.BodyWriter.WriteBodyContents(XmlDictionaryWriter writer)
at System.ServiceModel.Security.SecurityAppliedMessage.OnWriteBodyContents(XmlDictionaryWriter writer)
at System.ServiceModel.Security.SecurityAppliedMessage.OnWriteMessage(XmlDictionaryWriter writer)
at System.ServiceModel.Channels.BufferedMessageWriter.WriteMessage(Message message, BufferManager bufferManager, Int32 initialOffset, Int32 maxSizeQuota)
at System.ServiceModel.Channels.TextMessageEncoderFactory.TextMessageEncoder.WriteMessage(Message message, Int32 maxMessageSize, BufferManager bufferManager, Int32 messageOffset)
at System.ServiceModel.Channels.HttpOutput.SerializeBufferedMessage(Message message)
at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, 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.AuthenticateLiveIdInternal(ClientCredentials clientCredentials, SecurityTokenResponse deviceToken, String keyType)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateDevice(ClientCredentials clientCredentials)
at PluginRegistrationTool.CrmConnection.get_DiscoveryService() in D:\Sdk online\sdk\tools\pluginregistration\CrmConnection.cs:line 272
at PluginRegistrationTool.CrmConnection.RetrieveOrganizations() in D:\Sdk online\sdk\tools\pluginregistration\CrmConnection.cs:line 367
at PluginRegistrationTool.ConnectionsForm.OpenConnection(CrmConnection con) in D:\Sdk online\sdk\tools\pluginregistration\ConnectionsForm.cs:line 940- Proposed as answer by Andrii ButenkoMVP, Moderator Tuesday, September 4, 2012 12:08 PM
- Unproposed as answer by Andrii ButenkoMVP, Moderator Tuesday, September 4, 2012 12:09 PM
Tuesday, September 4, 2012 12:08 PM -
Hello,
I have already seen this issue and answer is:
1. Download the lates SDK.
2. Remove references from your plugin registration tool to old SDK assembles and add references to new SDK assemblies.
3. Rebuild your plugin registration tool.
4. Enjoy.
- Proposed as answer by _Vikram Tuesday, September 4, 2012 12:15 PM
- Marked as answer by Andrii ButenkoMVP, Moderator Tuesday, September 4, 2012 1:14 PM
Tuesday, September 4, 2012 12:11 PMModerator -
Try to go to the C:/Users/<your logged in username>/LivedeviceId folder and delete the xml file inside it. This should solve the problem.
<Sorry, i just realised that someone above has also suggested this solution. I am unable to delete this post now. >- Proposed as answer by SwetaGupta Tuesday, September 4, 2012 12:12 PM
- Edited by SwetaGupta Tuesday, September 4, 2012 12:13 PM
- Unproposed as answer by SwetaGupta Tuesday, September 4, 2012 12:13 PM
Tuesday, September 4, 2012 12:12 PM -
Thanks Andrii.. It works great..Tuesday, September 4, 2012 12:55 PM
-
I told you earlier.. it gets corrupted again & again and recompile is the only solution..
Contact["name"] = "Vin.k.s"; If it helps, Mark as answer to help others..
Tuesday, September 4, 2012 1:06 PM -
as Andrii suggested, i downloaded latest sdk from here and used the plugin reg tool frm this..
http://www.microsoft.com/en-in/download/details.aspx?id=24004
Tuesday, September 4, 2012 1:17 PM -
Hi Andrii,
I am still struggling with this problem even after re-compiling with the latest SDK assemblies.
Does this work for you (or anyone else out there) when attempting to connect to a deployment that has Rollup 10 installed? I can connect ok to an environment that uses Rollup 8 but a Rollup 10 environment seems to throw the same error as initially logged in this thread.
Thanks
Rob
Microsoft Certified Technology Specialist (CRM) GAP Consulting Ltd Microsoft Community Contributor Award 2011
Tuesday, September 4, 2012 8:29 PM