Asked by:
CRM2011 crmSvcUtil.exe Error: Metadata contains a reference that cannot be resolved

Question
-
Hi,
I tried to execute the following
crmsvcutil.exe /url:https://server1/org1/XRMServices/2011/Organization.svc /out:sdk.cs /username:myusername /password:mypassword /namespace:crm.Sdk
and received following error:
Exiting program with exception: Metadata contains a reference that cannot be res
olved: 'https://server1/org1/XRMServices/2011/Organization.svc?wsdl'.
Enable tracing and view the trace files for more information.
crmsvcutil.exe Error: 0 : Exiting program with exit code 2 due to exception : System.InvalidOperationException: Metadata contains a reference that cannot be resolved
---> System.Net.WebException: The operation has timed outat System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRet
riever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.R
etrieve(TimeoutHelper timeoutHelper)
--- End of inner exception stack trace ---
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.R
etrieve(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(Resolve
CallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(Metadat
aRetriever retriever)
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpoints(T
ype contractType, Uri serviceUri)
What could be the possibilities?- Edited by Henry Tan YH Monday, October 24, 2011 10:07 AM
Monday, October 24, 2011 9:57 AM
All replies
-
Hi,
is it CRM 2011 Online?
Please have a look at this article:
http://blog.abodit.com/2011/03/crmsvcutil-exe-with-microsoft-dynamics-crm-2011-online-problem/
Cheers,
Monday, October 24, 2011 10:20 PM -
-
Do you use CrmSvcUtil from SDK? For SDK command line format is different. Look here: http://msdn.microsoft.com/en-us/library/ff681563.aspx.
I use a Customer Portal version:
CrmSvcUtil /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:Xrm\Xrm.cs /url:http://Crm/Contoso/XRMServices/2011/Organization.svc
/domain:CONTOSO /username:administrator /password:pass@word1 /namespace:Xrm
/serviceContextName:XrmServiceContext /serviceContextPrefix:Xrm
Even in this case for AD authentication you missed /domain:
- Edited by Alena Grischenko Tuesday, October 25, 2011 3:52 AM
Tuesday, October 25, 2011 3:51 AM -
I had same problem and found out, that you can't run CrmSvcUtil from a network path. You should run it from a local drive, such c:\SDK\bin\..., then it worksThursday, March 15, 2012 6:52 PM
-
You are using https. So are you using Internal/External Claims Based Auth?
If this is configured, check for the correct Service-URL.
- Settings --> Customizations --> Developer Resources
Cheers,
mk
- Proposed as answer by KODE Friday, June 8, 2012 5:02 PM
Thursday, March 15, 2012 8:43 PM -
I am able to resolve this issue by replacing HTTPS to HTTP in my URL path.Wednesday, August 3, 2016 6:20 PM