none
Issue with CRM 2011 Plugin Registration Tool

    Question

  • I am having an issue with the CRM Plugin Registration tool - I can't even connect with my CRM OnLine instance.
    I know my UserId and password is correct, but I keep getting this error message when I click the 'connect' button:

    Unhandled Exception: System.InvalidOperationException: Metadata contains a reference that cannot be resolved: 'https://dev.crm.dynamics.com/XrmServices/2011/Discovery.svc?wsdl=wsdl1/XRMServices/2011/Discovery.svc?wsdl'.
       at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
       at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
       at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
       at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri)
       at Microsoft.Xrm.Sdk.Client.DiscoveryServiceConfiguration..ctor(Uri serviceUri)
       at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
       at Microsoft.Xrm.Sdk.Client.ServiceProxy`1..ctor(Uri uri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
       at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy..ctor(Uri uri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
       at PluginRegistrationTool.ManagedTokenDiscoveryServiceProxy..ctor(Uri serviceUri, ClientCredentials userCredentials) in C:\Users\Rusty_Cisney\Desktop\Dec 12 SDK\sdk\tools\pluginregistration\ToolServiceProxies.cs:line 33
       at PluginRegistrationTool.CrmConnection.get_DiscoveryService() in C:\Users\Rusty_Cisney\Desktop\Dec 12 SDK\sdk\tools\pluginregistration\CrmConnection.cs:line 258
       at PluginRegistrationTool.CrmConnection.RetrieveOrganizations() in C:\Users\Rusty_Cisney\Desktop\Dec 12 SDK\sdk\tools\pluginregistration\CrmConnection.cs:line 315
       at PluginRegistrationTool.ConnectionsForm.OpenConnection(CrmConnection con) in C:\Users\Rusty_Cisney\Desktop\Dec 12 SDK\sdk\tools\pluginregistration\ConnectionsForm.cs:line 940
    Inner Exception: System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
       at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)

     

    I've seen similar errors, but not anything with the "Inner Exception: System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required."   segment at the bottom. 

    Has anyone out there run into this before?  I'm using IE9 on a Win7, 64-bit machine if that makes a difference.

    Thursday, January 12, 2012 6:05 PM

Answers

  • I had a problem with this just a little while ago as well. It ended up being a firewall issue. The firewall was blocking login.live.com which the plugin registration tool was trying to use in order to generate a Live Device Id. Not sure what it needs that for in an on premise environment.

    Thankfully it was a quick fix: just copy the LiveDevice.xml file from %userprofile%\LiveDeviceId\  on a machine where it is working, to the machine where it isn't.

    Note that while this works on premise, I'm not sure if it would fix it for connecting to CRM Online. You might need to ensure that you can access login.live.com from the computer you're trying to connect from.
    Sunday, June 10, 2012 4:45 PM
  • Hey everyone,

    I did indeed find the answer to my issue.  It was *not* a firewall issue - it was my VPN and some goofy Policy rules.  It turns out that (and this is specific to my company - so probably isn't germaine to anyone else) I'm not allowed - by policy - to connect to anything else when I'm connected by VPN to my company network. 

    I just have to disconnect my VPN and I can jump right in to the reg tool. 

    Sorry for keeping everyone in suspense - somehow I turned off my reply alert to this thread and just happened to look at it.

    -Rusty

    • Marked as answer by RCisney Tuesday, August 14, 2012 7:04 AM
    Tuesday, August 14, 2012 7:04 AM

All replies

  • If your time/date/timezone settings are correct I would just try again.  To be honest, I have seen it go down before and then it will work again after a little while.

    Try it again and see if you still get the issue.


    Jamie Miley
    Check out my about.me profile!
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Sunday, January 15, 2012 12:10 AM
  •  Jamie,

    It's a Proxy server issue, I haven't still got that working but if you uncheck proxy settings, it will work normally.

    Vaibhav

    Tuesday, February 14, 2012 10:18 AM
  • I think i have the same problem, i´m testing crm so, i´ve got a cmr online instance, i´ve download de cca desktop, and i can´t turn on working no cca no registration tool, because proxy settings, i´ve got an live id that is different from my proxy userid (logic). How can i configure my proxy settings in a file so the tool (and cca) take only crm credentials or something like that??? is it possible?

    Does anyone try the same thing like i´m trying and have bet crm? or is impossible and is mandatory to install the crm in my enterprise?

    I´m waiting for your opinions...

    Thanks in advance.

    The error:

    Cca: Unable to login - Please make sure your login details are correct and try again. Contact administrator if the problem persists.

    System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Se produjo un error durante el intento de conexión ya que la parte conectada no respondió adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexión establecida ya que el host conectado no ha podido responder 65.54.165.137:443
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
       at System.Net.HttpWebRequest.GetRequestStream()
       at Microsoft.Crm.Accelerator.Cca.WpfDesktop.DeviceIdManager.ExecuteRegistrationRequest(String url, DeviceRegistrationRequest registrationRequest) in C:\Program Files (x86)\Microsoft Uii\CCA\Source Code\AgentDesktop\Helper Code\DeviceidManager.cs:line 351
       at Microsoft.Crm.Accelerator.Cca.WpfDesktop.DeviceIdManager.RegisterDevice(Guid applicationId, Uri issuerUri, DeviceUserName userName) in C:\Program Files (x86)\Microsoft Uii\CCA\Source Code\AgentDesktop\Helper Code\DeviceidManager.cs:line 291
       at Microsoft.Crm.Accelerator.Cca.WpfDesktop.DeviceIdManager.RegisterDevice(Guid applicationId, Uri issuerUri, String deviceName, String devicePassword) in C:\Program Files (x86)\Microsoft Uii\CCA\Source Code\AgentDesktop\Helper Code\DeviceidManager.cs:line 187
       at Microsoft.Crm.Accelerator.Cca.WpfDesktop.DeviceIdManager.RegisterDevice(Guid applicationId, Uri issuerUri) in C:\Program Files (x86)\Microsoft Uii\CCA\Source Code\AgentDesktop\Helper Code\DeviceidManager.cs:line 140
       at Microsoft.Crm.Accelerator.Cca.WpfDesktop.DeviceIdManager.RegisterDevice(Guid applicationId) in C:\Program Files (x86)\Microsoft Uii\CCA\Source Code\AgentDesktop\Helper Code\DeviceidManager.cs:line 126
       at Microsoft.Crm.Accelerator.Cca.WpfDesktop.DeviceIdManager.RegisterDevice() in C:\Program Files (x86)\Microsoft Uii\CCA\Source Code\AgentDesktop\Helper Code\DeviceidManager.cs:line 116
       at Microsoft.Crm.Accelerator.Cca.WpfDesktop.MainWindow.GetDeviceCredentials() in C:\Program Files (x86)\Microsoft Uii\CCA\Source Code\AgentDesktop\MainWindow.xaml.cs:line 201
       at Microsoft.Crm.Accelerator.Cca.WpfDesktop.MainWindow..ctor() in C:\Program Files (x86)\Microsoft Uii\CCA\Source Code\AgentDesktop\MainWindow.xaml.cs:line 118 

    Tuesday, March 20, 2012 9:02 AM
  • Monday, March 26, 2012 11:43 AM
  • I had a problem with this just a little while ago as well. It ended up being a firewall issue. The firewall was blocking login.live.com which the plugin registration tool was trying to use in order to generate a Live Device Id. Not sure what it needs that for in an on premise environment.

    Thankfully it was a quick fix: just copy the LiveDevice.xml file from %userprofile%\LiveDeviceId\  on a machine where it is working, to the machine where it isn't.

    Note that while this works on premise, I'm not sure if it would fix it for connecting to CRM Online. You might need to ensure that you can access login.live.com from the computer you're trying to connect from.
    Sunday, June 10, 2012 4:45 PM
  • Hi,

    Is this issue resolved? Was this the firewall settings as mentioned in previous replies??

    Thanks,

    Adi.

    Thursday, July 12, 2012 11:23 PM
  • I had a similar issue that I was able to resolve by adding an app.config file, in which the proxy can be specified, to the Plugin Registration Tool and rebuilding.

    Credit where credit is due, I found this solution here: http://xrmbits.com/plugin-registration-tool-error-metadata-contains-a-reference-that-cannot-be-resolved/

    Hope this helps.

    Regards,

    Sven


    • Proposed as answer by Sven Moens Wednesday, July 25, 2012 10:26 AM
    • Edited by Sven Moens Wednesday, July 25, 2012 10:35 AM
    Wednesday, July 25, 2012 10:26 AM
  • Hey everyone,

    I did indeed find the answer to my issue.  It was *not* a firewall issue - it was my VPN and some goofy Policy rules.  It turns out that (and this is specific to my company - so probably isn't germaine to anyone else) I'm not allowed - by policy - to connect to anything else when I'm connected by VPN to my company network. 

    I just have to disconnect my VPN and I can jump right in to the reg tool. 

    Sorry for keeping everyone in suspense - somehow I turned off my reply alert to this thread and just happened to look at it.

    -Rusty

    • Marked as answer by RCisney Tuesday, August 14, 2012 7:04 AM
    Tuesday, August 14, 2012 7:04 AM