mscrmtools / mscrmtools.xrm.connection Goto Github PK
View Code? Open in Web Editor NEWProvides Winforms control to connect to Microsoft Dynamics CRM deployments
License: GNU Lesser General Public License v3.0
Provides Winforms control to connect to Microsoft Dynamics CRM deployments
License: GNU Lesser General Public License v3.0
Hi,
We have a online CRM instance with text message authentication.Trying to connect to an online instance, using the connection string, however, I am not having much luck.
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 18-10-2017 10:55:57 Unable to Login to Dynamics CRM
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 18-10-2017 11:01:12
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 18-10-2017 14:11:13 Unable to Login to Dynamics CRM
Connection String
@daryllabar commented on Wed May 03 2017
Given this state:
When switching the connection from Prod to Dev, the XTB appears to create an entirely new connection to Dev.
Any chance it can just use the existing connection rather than taking 3-4 second to create another connection to Dev?
@MscrmTools commented on Wed May 03 2017
It should be possible to maintain a list of connections used during the session and to obtain it from there when "reconnecting"
@daryllabar commented on Wed May 03 2017
That's what I was hoping for! Let me know when it's done ;)
@MscrmTools commented on Wed May 03 2017
I will just move this "issue" to the appropriate repository since it will be handled by connection project
Hi
I get connection errors when trying to connect to any of my UK data centre systems on the .crm11 domain, I can conect fine to all my .crm4 orgs but the log produces the following after erroring out to a crm11 org (using version 1.2017.3.14)
I did manage to make a connection for a short time and it retrieved the entities but then timed out again.
Any help appreciated.
Peter
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 23/08/2017 09:00:06 ERROR REQUESTING ORGS FROM THE DISCOVERY SERVER
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 23/08/2017 09:00:06 Source : mscorlib
Method : HandleReturnMessage
Date : 23/08/2017
Time : 09:00:06
Error : Access is denied.
Stack Trace : Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
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)
@mtnmuncher commented on Thu Jan 26 2017
See attachment for pop-up when I click 'connect'. I can create the connection. I just cannot open the connection.
1.del MSCRMTools\XrmToolbox folder. I thought it would be better to start anew.
2.open XrmToolBox
3.create new connection
4.select new connection.
5.connect
Since I could not get the downloaded assembly to work, I then tried running from source. Please see error when running from Visual Studio.
An unexpected error occured: System.InvalidCastException: Unable to cast object of type 'System.Windows.Forms.ToolStripDropDownButton' to type 'System.Windows.Forms.ToolStripMenuItem'.
at McTools.Xrm.Connection.WinForms.CrmConnectionStatusBar.actionItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at XrmToolBox.Program.Main(String[] args) in C:\downloads\XrmToolBox-v.1.2017.1.10\XrmToolBox\Program.cs:line 46
@MscrmTools commented on Thu Jan 26 2017
Ok, so it happens only when connecting?
Can you connect with the button on the main toolbar waiting for a fix?
@mtnmuncher commented on Thu Jan 26 2017
Yes, it appears to be isolated to the Connect, located in lower left corner. Connect using main toolbar is successful. Thanks.
@rajyraman commented on Fri Jan 27 2017
Same behaviour. Able to connect using the "Connect to CRM" button as suggested.
I just accidently deleted the connection file in the connection manager instead of only deleting a single connection.
Now I always get an error when reentering the connection manager, I cannot use a connection nor save one and I cannot bind a new connection file.
I can create one, but it is not loaded on the next run.
Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.
************** Ausnahmetext **************
System.InvalidOperationException: Die Sequenz enthält kein übereinstimmendes Element.
bei System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func
2 predicate)
bei McTools.Xrm.Connection.WinForms.ConnectionSelector.ConnectionSelector_Load(Object sender, EventArgs e)
bei System.Windows.Forms.Form.OnLoad(EventArgs e)
bei System.Windows.Forms.Form.OnCreateControl()
bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
bei System.Windows.Forms.Control.CreateControl()
bei System.Windows.Forms.Control.WmShowWindow(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.Form.WmShowWindow(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.
Zum Beispiel:
Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
Ausnahmen an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
@astrohart commented on Fri Nov 10 2017
The proper UX for the Select A Connection form would really be to grey out the "OK" or "Connect" button if nothing is selected in the list box. Right now, if I click to remove any sort of highlighting whatsoever from the Connections list box, so that none of the items is selected, or if I delete all the connections, then the OK button still is clickable and just plain does not do anything.
Typically, in applications written for the Microsoft Windows desktop, each button, if clickable, should always perform a definite action from the user's perspective. If a button is clickable and then does not do anything, that is not good UX.
The recommended UX is to grey out any buttons that don't apply, when certain criteria are met.
@MscrmTools commented on Fri Nov 10 2017
Again, really minor issue... I will "fix" it
The error is given when trying to connect to an on-prem installed IFD environment. The error in XTB trace file is
Error : ID3242: The security token could not be authenticated or authorized.
I've tried (almost) every combination of URL (both disco server and app-server), username (both xxx\yyy and [email protected]) etc. but all fails.
Any hints?
I should add that this is a new issue with the latest version of XTB. Previous versions all work fine.
See XrmToolBox issue for details
Hello,
I have a customer that had an instance with the url https://ABCdev.crm4.dynamics.com after a while he created another one https://ABCdev2.crm4.dynamics.com, because there was some components installed in ABCdev that he didn't wanted and it wasn't possible to remove. So they migrated the components to ABCdev2.
After that procedure was complete, they decided to change the URL's of the orgs.
ABCdev was changed to ABCdevold and ABCdev2 was changed to ABCdev
What happens now is when connecting to the XrmToolBox when the authentications is done we check the connection, the OrganizationDataServiceUrl and the WebApplicationUrl change from ABCdev to ABCdevold and when we look to the entities present, we see that we are connected to the wrong instance.
Is there a way to fix this?
@altmank commented on Mon Oct 31 2016
Connecting to an IFD instance of CRM 2016. I can setup a connection and it says successful in the wizard section but when trying to connect outside of the connection setup, I get the error:
Value cannot be null. Parameter name: s
I'm using V1.2016.10.2 of XrmToolBox.
@daryllabar commented on Mon Oct 31 2016
This isn't for when generating Early Bound Entities using the Early Bound Generator is it?
@altmank commented on Mon Oct 31 2016
Hi @daryllabar, I was using the "Connect To CRM" button from the main program interface, not within a plugin.
@daryllabar commented on Mon Oct 31 2016
OK, just making sure. There is a known bug with that plugin.
@altmank commented on Mon Oct 31 2016
Using the connect drop-down from the bottom left of the interface, I actually get an exception version of the error. That exception text is as follows:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at XrmToolBox.MainForm.b__24_3(Object sender, ConnectionFailedEventArgs e)
at McTools.Xrm.Connection.ConnectionManager.SendFailureMessage(String failureReason, Object parameter)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
@altmank commented on Mon Oct 31 2016
Here is my config that is failing, for confidentiality I replaced the values in the config with placeholders.
<ConnectionDetail> <AuthType>Federation</AuthType> <ConnectionId>daf6e6cc-1c9d-4614-a36b-ef276f374b65</ConnectionId> <ConnectionName>Test Environment</ConnectionName> <ConnectionString></ConnectionString> <UseConnectionString>false</UseConnectionString> <IsCustomAuth>false</IsCustomAuth> <UseIfd>true</UseIfd> <UseOnline>false</UseOnline> <UseOsdp>false</UseOsdp> <UserDomain><AD_domain></UserDomain> <UserName>altmank</UserName> <UserPassword></UserPassword> <SavePassword>false</SavePassword> <UseSsl>true</UseSsl> <ServerName><subdomain>.<domain>.com</ServerName> <ServerPort>443</ServerPort> <OriginalUrl>https://<subdomain>.<domain>.com</OriginalUrl> <Organization><orgName></Organization> <OrganizationUrlName><orgName></OrganizationUrlName> <OrganizationFriendlyName><orgName></OrganizationFriendlyName> <OrganizationServiceUrl>https://<subdomain>.<domain>.com/XRMServices/2011/Organization.svc</OrganizationServiceUrl> <OrganizationDataServiceUrl>https://<subdomain>.<domain>.com/XRMServices/2011/OrganizationData.svc</OrganizationDataServiceUrl> <OrganizationVersion>8.1.0.359</OrganizationVersion> <HomeRealmUrl></HomeRealmUrl> <Timeout>1200000000</Timeout> <WebApplicationUrl></WebApplicationUrl> <LastUsedOn>01/01/0001 00:00:00</LastUsedOn> </ConnectionDetail>
@MscrmTools commented on Tue Nov 01 2016
Please do not fill domain name but instead provide username format as domain\login
@altmank commented on Tue Nov 01 2016
Hi @MscrmTools, I adjusted the config to use domain in my username field but the exact same issue persists.
@MscrmTools commented on Wed Nov 02 2016
Can you look into the connection log file that should be located in XrmToolBox root folder? As the stacktrace talks about connection failure, maybe the connection did not succeed after all
@altmank commented on Tue Nov 08 2016
The content of the log file is this:
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : OrganizationWebProxyClient is null
Minor usability improvement suggestion:
When working with many organizations using the same credentials it would be nice to have the credentials stored separate from the connections.
One benefit could be when you have changed password on your account, you would only need to change it once for all connections using that credential.
Does the XRMToolbox support connecting to Siteminder protected instances of Dynamics 365?
It would be great to be able to save all currently loaded connection to a new file.
Usually the default connection file contains a lot of connections, and if you want to separate them into project/customer dependent connections you would have to create a new file and then create the connections all over.
Hi,
Since the update on CRM environment with Two Factor Authentication, connecting using XrmToolBox shows "Authentication Failure".
I tried connecting using Connection String but i think i have incorrect format i got from another thread.
AuthType=OAuth;Username=your_office365_address; Password=the_password;Url=https://organization.crm.dynamics.com;AppId={the id of an app you created in Azure AD that has authorization against CRM Online} ;RedirectUri=http://whatever.com;TokenCacheStorePath=c:\Temp\OauthCache.bin;LoginPrompt=Auto
Any update regarding this issue? I appreaciate feedbacks from those who can connect using XrmToolbox. :)
Regards,
Edu
I opened another connection file (Add existing...), which happened to have the name Default
in the file (the actual file name was something else).
This makes the connection dialog confusing, as there already was one connection named Default
.
Adding files (and creating new files) might well check that the name does not already exist, and prevent duplicates.
Sometimes when I create a new connection the tool crashes leaving a blank connection file behind.
@JasonMcAndrew commented on Thu Mar 30 2017
Hello,
I'm having a bizarre problem. I can connect to my Dynamics CRM Online Sandbox and modify SiteMap no problem.
If I connect to my Live environment and modify the SiteMap it's actually loading the SiteMap from the Sandbox.
Same issue if I load the Ribbon Workbench it loads the Sandbox Entities not the Live Entities.
I have tried various version of XrmToolBox but still the same issue, has anyone else encountered this?
Thanks
Jason
@MscrmTools commented on Thu Mar 30 2017
When connecting to the Live environment, are you applying the new connection to the opened plugin?
To be sure, can you explain the step by step scenario when it comes to connecting and opening plugin?
@JasonMcAndrew commented on Thu Mar 30 2017
Thanks for your help.
@MscrmTools commented on Thu Mar 30 2017
Never seen that...
Can you:
Edit XrmToolBox.exe.config file to change the switch to "Verbose"
Replay the procedure
Open connection log file (on XrmToolBox storage folder) to check why it is connecting to sandbox and not live org
@JasonMcAndrew commented on Thu Mar 30 2017
So it's discovering the 2 organizations but then connecting to ourdomaintesting instead of ourdomain1.
Log file attached.
XrmToolBox_Connection-2017-03-30.txt
@MscrmTools commented on Thu Mar 30 2017
Ok, so the problem is from Microsoft SDK assemblies...
May I share this log file with Microsoft to see what is going on?
@JasonMcAndrew commented on Thu Mar 30 2017
Yes go ahead. Thanks for your help.
@JasonMcAndrew commented on Mon Apr 10 2017
Has there been any update from Microsoft on this?
Thanks
Jason
See issue #369 Solution Transfer Tool: Timeout Error on XrmToolBox issues
I have Dev, QA, Stage, and Prod environments, all with the same AD credentials. I have to change my password every 60 days... it would be nice to be able to select multiple connections, and change the passwords for all in one shot.
When attempting to use the XrmToolbox Plugin Project Template I receive errors regarding the framework compatibility.
Install-Package : Could not install package 'MscrmTools.Xrm.Connection 1.2017.10.15'. You are trying to install this package into a project that targets
'.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact
the package author.
At line:1 char:1
@prt33k commented on Tue May 30 2017
Hi Team,
I am unable to connect to customer D365 instance using XrmToolBox. I am able to connect to the same org using browser.
Following is the error
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 5/30/2017 7:32:50 PM ERROR REQUESTING ORGS FROM THE DISCOVERY SERVER
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 5/30/2017 7:32:50 PM Source : mscorlib
Method : HandleReturnMessage
Date : 5/30/2017
Time : 7:32:50 PM
Error : Access is denied.
The stack trace is also attached.
Any help is appreciated!!
Thanks,
Prateek
log.txt
Hi all,
I am trying to connect to crm 2011 with this tool but it was not successful, hope you can help me, thanks in advance, here some input:
==============================
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 6/13/2018 11:39:26 AM Unable to Login to Dynamics CRM
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Verbose 16 6/13/2018 2:46:07 PM Initialize CRM connection Started - AuthType: AD
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Information 8 6/13/2018 2:46:07 PM Discovery URI is = https://:443/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Information 8 6/13/2018 2:46:07 PM DiscoverOrganizations - Initializing Discovery Server Object with https:///XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Verbose 16 6/13/2018 2:46:07 PM DiscoverOrganizations - attempting to connect to CRM server @ https:///XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Verbose 16 6/13/2018 2:46:08 PM DiscoverOrganizations - created CRM server proxy configuration for https:///XRMServices/2011/Discovery.svc - duration: 00:00:00.7225457
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Verbose 16 6/13/2018 2:46:08 PM DiscoverOrganizations - proxy requiring authentication type : ActiveDirectory
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Verbose 16 6/13/2018 2:46:08 PM DiscoverOrganizations - service proxy created - total create duration: 00:00:00.7255561
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 6/13/2018 2:46:35 PM ERROR REQUESTING ORGS FROM THE DISCOVERY SERVER
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 6/13/2018 2:46:35 PM Source : mscorlib
Method : HandleReturnMessage
Date : 6/13/2018
Time : 2:46:35 PM
Error : The caller was not authenticated by the service.
Stack Trace : Server stack trace:
at System.ServiceModel.Security.IssuanceTokenProviderBase1.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.SecurityProtocol.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.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)
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 6/13/2018 2:46:35 PM Source : mscorlib
Method : HandleReturnMessage
Date : 6/13/2018
Time : 2:46:35 PM
Error : The caller was not authenticated by the service.
Stack Trace : Server stack trace:
at System.ServiceModel.Security.IssuanceTokenProviderBase1.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.SecurityProtocol.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.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)
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 6/13/2018 2:46:35 PM Unable to Login to Dynamics CRM
We have a hosted environment with multiple clients running on it. The domain is "host"
However, there are multiple clients that have users with the same first and last name, so we can't set them all up in our AD as host\firstname.lastname and so we set up alternate UPN Suffixes for them so they can log into CRM as [email protected] (basically, their email address)
Such clients are not able to connect using the XRM Toolbox with error posted below but they can log into CRM just fine.
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 2018-02-28 12:50:32 PM Source : System.ServiceModel
Method : ReadResponse
Date : 2018-02-28
Time : 12:50:32 PM
Error : ID3242: The security token could not be authenticated or authorized.
Stack Trace : at System.ServiceModel.Security.WSTrustChannel.ReadResponse(Message response)
at System.ServiceModel.Security.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration1.Issue(AuthenticationCredentials authenticationCredentials) at Microsoft.Xrm.Sdk.Client.ServiceConfiguration
1.AuthenticateInternal(AuthenticationCredentials authenticationCredentials)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration1.AuthenticateFederationInternal(AuthenticationCredentials authenticationCredentials) at Microsoft.Xrm.Sdk.Client.ServiceConfiguration
1.Authenticate(AuthenticationCredentials authenticationCredentials)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ClaimsIFDFailOverAuth[T](IServiceManagement1 servicecfg, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, Int32 depthLevel, Boolean tryNetworkCred) at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.CreateAndAuthenticateProxy[T](IServiceManagement
1 servicecfg, Uri ServiceUri, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, String LogString, CrmLogEntry logSink)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discoveryServiceUri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials, CrmLogEntry logSink)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.InitCRM2011Service()
======================================================================================================================
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 2018-02-28 12:50:32 PM Unable to Login to Dynamics CRM
@oalamer commented on Wed Dec 07 2016
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at McTools.Xrm.Connection.WinForms.ConnectionWizard.llOpenConnectionLog_LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e)
at System.Windows.Forms.LinkLabel.OnLinkClicked(LinkLabelLinkClickedEventArgs e)
at System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
@MscrmTools commented on Wed Dec 07 2016
Hi,
It seems there is a bug when finding the log file.
You should be able to find it in the following folder: C:\Users<your_login>\AppData\Roaming\MscrmTools\XrmToolBox\1.2016.11.4
what does the log file say?
@MscrmTools commented on Wed Dec 07 2016
also, may I see your XrmToolBox.exe.config file?
@r-weisser commented on Tue Jun 19 2018
I'm currently dealing with multiple different systems and connections(> 20)
What would be the best way to handle all of them?
Any suggestions here?
@MscrmTools commented on Tue Jun 19 2018
The solution is already available with "Connections Files". See documentation
@r-weisser commented on Wed Jun 27 2018
Thank you for the link.
This behaviour is exactly how it should be.
After struggling a bit with the menubar of the connection window which unnecessarily hides items on selection I want to suggest some improvements:
@udinesh5 commented on Thu Apr 06 2017
Hi All,
I get 'Unable to connect to Dynamics CRM' error when I try to connect to D365 Online(8.2) instance hosted in AUS data center.
I tried to connect using both of the following ways
I am able to connect to a US data center CRM2016 Online(8.1) instance not upgraded to the D365.
XrmToolBox Connection Error.zip
Thanks
Dinesh
@MscrmTools commented on Thu Apr 06 2017
Hi,
Can you precise your XrmToolBox version?
Also, what information are in the connection logs?
@udinesh5 commented on Thu Apr 06 2017
The version is 1.2017.3.14
An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
Stack Trace : Server stack trace:
at System.ServiceModel.Channels.SecurityChannelFactory1.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 System.ServiceModel.Security.IWSTrustContract.Issue(Message message)
at System.ServiceModel.Security.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration1.Issue(AuthenticationCredentials authenticationCredentials) at Microsoft.Xrm.Sdk.Client.ServiceConfiguration
1.AuthenticateInternal(AuthenticationCredentials authenticationCredentials)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration1.AuthenticateWithOrgIdForACS(AuthenticationCredentials authenticationCredentials, Uri identifier) at Microsoft.Xrm.Sdk.Client.ServiceConfiguration
1.AuthenticateOnlineFederationInternal(AuthenticationCredentials authenticationCredentials)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration1.Authenticate(AuthenticationCredentials authenticationCredentials) at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ClaimsIFDFailOverAuth[T](IServiceManagement
1 servicecfg, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, Int32 depthLevel, Boolean tryNetworkCred)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.CreateAndAuthenticateProxy[T](IServiceManagement`1 servicecfg, Uri ServiceUri, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, String LogString)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ConnectAndInitCrmOrgService(OrganizationDetail orgdata, Boolean IsOnPrem, Uri homeRealmUri)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.InitCRM2011Service()
@MscrmTools commented on Thu Apr 06 2017
Is the office365 tenant is federated with a local AD?
@udinesh5 commented on Thu Apr 06 2017
The tenant has DirSync configured.
The user account I use on XrmToolBox is an "In cloud" username ending with .onmicrosoft.com.
Also, there 2 CRM instances.
I am able to connect and work with the CRM instance using Microsoft Dynamics CRM Plugin Registration Tool without any issues.
@MscrmTools commented on Thu Apr 06 2017
Ok, this is a scenario I'm not able to test unfortunately. Any chance you provide me a similar test account?
@Customery commented on Sun May 07 2017
I get the same error trying to connect to a Dynamics 365 online instance in the AUS data centre that uses DirSync (@customerdomain.com). I am successful connecting to the US data centre using Office 365 credentials (@microsoftonline.com).
Let me know if you'd like me to provide a test account to help troubleshoot.
Vive la France!
@MscrmTools commented on Sun May 07 2017
Yes, that would be awesome! Thanks Neil
@astrohart commented on Fri Nov 10 2017
See the image below:
The OK and Cancel buttons could be more clearly and intuitively named, as I am not sure what they mean on a form like this.
I am assuming that the OK button connects to the selected connection and the Cancel button dimisses the form without connecting. Perhaps:
This is slightly better UX.
@MscrmTools commented on Fri Nov 10 2017
As you assumed correctly, I'm pretty sure everyone does too... this is really minor "issue" but I could eventually change this
TLS 1.0 and SSL 3 is disabled in our organizations so we are not able to use this tool.
In .NET 4.5. TLS 1.2 is supported, but it’s not a default protocol. You need to opt-in to use it. The following code will make TLS 1.2 default, make sure to execute it before making a connection to secured resource:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
http://blogs.perficient.com/microsoft/2016/04/tsl-1-2-and-net-support/
Error:
Inner Exception Level 1 :
Source : System
Method : GetResponse
Date : 7/10/2017
Time : 12:02:52 AM
Error : The request was aborted: Could not create SSL/TLS secure channel.
Stack Trace : at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
When a connection to CRM Online fails, display a message to replace url org name by org unique name
Specifying a connection file in code does not work anymore, if the connection file does not exist in the connectionlist file.
I use the following code to make sure connection file is stored in proper appdata folder:
var configpath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), AppName);
if (!Directory.Exists(configpath))
{
Directory.CreateDirectory(configpath);
}
ConnectionManager.ConfigurationFile = Path.Combine(configpath, "Connections.config");
But that file is no longer used when starting the program.
Related to #2.
@con-ssc commented on Mon Nov 14 2016
I have relatively often the need to duplicate a connection because only the org name changes or the server address. It would be nice if there was an option to duplicate a connection just to tweak some thing.
It seems the connection file selector does not remember which file was last used, so every time I start my app I have to first select my connection file.
Or am I missing something in the interface to the ConnectionManager?
When trying to open an existing connection file I can only see/select files with suffix .xml, which makes it quite hard to select existing files ending with .config.
@daryllabar commented on Thu Dec 15 2016
@xairrick commented on Tue May 16 2017
I had existing connection that was working. I edited the connection to update my password and everything was successful, but now when I try to connect I get an "Required xml:lang attribute value is missing" error.
I was able to create a new connection to the same crm org and the new connection works fine.
@MscrmTools commented on Sat Jun 10 2017
Can you reproduce anytime?
@tudorific commented on Thu Jan 12 2017
Hi,
I am trying to create a new connection to our CRM test environment, however, I am constantly getting the 'Unable to Login to Dynamics CRM' error message.
I have tried both setting up the connection through the UI and also a connection string but I get the same result. My connection string is:
ServiceUri=https:///;AuthType=IFD;Domain=DEV;UserName=DEV\administrator;Password=test1234;LoginPrompt=Never;
The log shows the following:
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 1/12/2017 9:01:46 AM Source : System.ServiceModel
Method : ReadResponse
Date : 1/12/2017
Time : 9:01:46 AM
Error : ID3082: The request scope is not valid or is unsupported.
Stack Trace : at System.ServiceModel.Security.WSTrustChannel.ReadResponse(Message response)
at System.ServiceModel.Security.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Issue(AuthenticationCredentials authenticationCredentials)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateInternal(AuthenticationCredentials authenticationCredentials)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateFederationInternal(AuthenticationCredentials authenticationCredentials)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(AuthenticationCredentials authenticationCredentials)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ClaimsIFDFailOverAuth[T](IServiceManagement`1 servicecfg, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, Int32 depthLevel, Boolean tryNetworkCred)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.CreateAndAuthenticateProxy[T](IServiceManagement`1 servicecfg, Uri ServiceUri, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, String LogString)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discoveryServiceUri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.InitCRM2011Service()
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 1/12/2017 9:01:46 AM Unable to Login to Dynamics CRM
Is there something I am missing?
Thanks for the help!
@tudorific commented on Thu Jan 12 2017
I have also tried leaving the Domain blank in the above connection string but then I get the following error in the log file:
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 1/12/2017 9:33:07 AM Source : Microsoft.Xrm.Sdk
Method : .ctor
Date : 1/12/2017
Time : 9:33:07 AM
Error : Value cannot be null.
Parameter name: securityTokenResponse
Stack Trace : at Microsoft.Xrm.Sdk.Client.ServiceProxy`1..ctor(IServiceConfiguration`1 serviceConfiguration, SecurityTokenResponse securityTokenResponse)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.CreateAndAuthenticateProxy[T](IServiceManagement`1 servicecfg, Uri ServiceUri, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, String LogString)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discoveryServiceUri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.InitCRM2011Service()
Hi,
When we try to connect to Dynamics 365 online environment in a UK tenant we obtain the following error:
"Metadata contains a reference that cannot be resolved:
'https://disco.crm11.dynamics.com/XRMServices/2011/Discovery.svc?wsdl&sdkversion=8.2'".
Any ideas?
Many thanks & Regards,
David Narbona
When using McTools.Xrm.Connection.dll version 1.2016.3.29 with a program installed using msi installer, it is not possible to access the MscrmTools.ConnectionsList.xml file.
Starting the connection selector dialog displays this:
Error details:
System.Exception: Error while serializing: Access to path C:\Program Files\Cinteros AB\Cinteros CRM Deployer\MscrmTools.ConnectionsList.xml is denied. vid McTools.Xrm.Connection.XmlSerializerHelper.SerializeToFile(Object o, String path) vid McTools.Xrm.Connection.ConnectionsList.Save() vid McTools.Xrm.Connection.WinForms.ConnectionSelector.tscbbConnectionsFile_SelectedIndexChanged(Object sender, EventArgs e)
Related to #2.
On Windows Server 2008 R2 when you try to make a new connection you have white font on a white background so you cannot see what you are typing. To double check, you can select all and then you can see what you have typed.
I am using XrmToolBox v1.2018.1.20.
My dev environment just updated to D365 V9.0.1.459 and when trying to generate classes with Early Bound Generator, it connects, displays organizations, I select one but it just continuously prompts for login. Using other tools such as FetchXML Builder connects and executes just fine.
The log shows "Attempting to login using interactive mode" even though I have logged in to the Dev environment using my saved connection settings.
Then it shows:
Then it just repeats until finally I push Cancel and it shows "User aborted Login" (of course).
I can connect to Test, D365 V8.2.2.339 and it works just fine.
Since our client turned on Two Factor Authentication, XRMToolbox won't connect to Dynamics 365 online.
When I use Microsoft's DataMigrationUtility, I had to use the most recent version, and then it sends me SMS authentication etc and works fine.
Is connecting XRMToolbox with Two Factor Authentication Supported?
If it is - how?
I've tried - and failed so far - with a connection string, but, TBH, struggle to understand how they work.
Chris
This tool handles most connection scenarios available, so it would be really handy if it could display the corresponding connection string for it's connections.
Tried different ways:
Connection wizard -> Entered URL (https://ORGNAME.crm.dynamics.com) -> Username and password
RESULT:
"Unable to login to Dynamics CRM.
If the unique name of you organization is different from the name used in the url provided..."
Connection wizard -> Entered URL (https://ORG_UNIQUE_ID.crm.dynamics.com) -> Username and password
RESULT:
"Unable to find the organization based on its url name.
If the unique name of you organization is different from the name used in the url provided..."
Connection wizard -> Provide ConnectionString -> tried with <add name="OnlineQA" connectionString="AuthType=Office365;[email protected]; Password=zzzzzzzz;Url=https://orgXXXXXX.crm.dynamics.com"/>
RESULT:
"Organization Name cannot be null or empty.
Parameter Name: Organization Name."
Thanks,
Marco
Could you please share the StrongName Password?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.