CrmSvcUtil has stopped working message

Jul 20, 2010 at 6:27 PM
Edited Jul 20, 2010 at 6:31 PM

I have successfully executed the program several times, but on a fairly large implementation, it fails with the above message. The execution message blow are generated AFTER replying to the message. How can I remedy this?

H:\Devo\CSPortal-Test\Microsoft.Xrm\Tools>crmsvcutil /server:"http://crm/dummyname" /namespace:Xrm /dataContextPrefix:Xrm /out:bitp2Xrm.cs

Unhandled Exception: System.Net.WebException: The operation has timed out
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequ
est request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
ame, Object[] parameters)
   at Microsoft.Crm.SdkTypeProxy.Metadata.MetadataService.Execute(MetadataServic
eRequest Request)
   at Microsoft.Xrm.Client.Services.MetadataServiceWrapper.Execute(Object reques
t)
   at Microsoft.Xrm.Client.Services.CachedOrganizationService.InnerExecute(Metad
ataServiceRequest request)
   at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.InnerExecute[TReque
st,TResponse,TResult](TRequest query, Func`2 execute, Func`2 selector)
   at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.<>c__DisplayClass8`
3.<LookupAndInsert>b__6(String _)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.<>c__DisplayClass5`1.<Get>b
__4(String k)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.<>c__DisplayClass2`1.<Get>b
__0(Mutex _)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.Lock(String key, Int32 mill
isecondsTimeout, Action`1 action)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Int32 mi
llisecondsTimeout, Func`2 loadFromCache, Func`2 loadFromService)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Int32 mi
llisecondsTimeout, Func`2 loadFromCache, Func`2 loadFromService, Action`2 addToC
ache)
   at Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Func`2 l
oadFromCache, Func`2 loadFromService, Action`2 addToCache)
   at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.LookupAndInsert[TRe
quest,TResponse,TResult](TRequest query, Func`2 execute, Func`2 selector, String
 selectorCacheKey)
   at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.Get[TRequest,TRespo
nse,TResult](TRequest query, Func`2 execute, Func`2 selector, String selectorCac
heKey)
   at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.InnerExecute[TReque
st,TResponse,TResult](TRequest request, Func`2 execute, Func`2 selector, String
selectorCacheKey)
   at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.Execute[T](Metadata
ServiceRequest request, Func`2 execute, Func`2 selector, String selectorCacheKey
)
   at Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute[T](Metadat
aServiceRequest request, Func`5 execute, Func`2 selector, String selectorCacheKe
y)
   at Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute[T](Metadat
aServiceRequest request, Func`2 selector, String selectorCacheKey)
   at Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute[T](Metadat
aServiceRequest request)
   at Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute(Object req
uest)
   at Microsoft.Xrm.Client.Services.IOrganizationServiceExtensions.Execute[T](IO
rganizationService service, MetadataServiceRequest request)
   at Microsoft.Xrm.Client.Services.IOrganizationServiceExtensions.RetrieveAllEn
tities(IOrganizationService service, MetadataItems metadataItems, Boolean retrie
veAsIfPublished)
   at CrmSvcUtil.Generator.<GenerateSuggestedNames>b__dc(IOrganizationService se
rvice)
   at Microsoft.Xrm.Client.Services.IOrganizationServiceExtensions.Using[T](Func
`1 create, Func`2 action)
   at Microsoft.Xrm.Client.Data.Services.BaseDataContext.UsingService[T](Func`2
action)
   at CrmSvcUtil.Generator.GenerateSuggestedNames(XElement metadataElement)
   at CrmSvcUtil.Generator.Generate(IDictionary`2 arguments)
   at CrmSvcUtil.Program.Main(String[] args)

Jul 20, 2010 at 7:10 PM

In very large deployments, there can be CRM timeouts when querying the metadata.  We have added additional parameters to the connection string to allow you to specify a custom timeout, and that will be included in the next SDK release.  In the meantime, the only thing you can do is to run this directly on your CRM server so that you have no network bandwidth issues, and to do it in a non-busy time, on a well-tuned CRM deployment.

Shan McArthur
www.shanmcarthur.net

Jul 20, 2010 at 7:24 PM

Unfortunately, running it on the server did not solve the problem. When should we expect to see the updated SDK?

Jul 21, 2010 at 12:44 PM

Definitely a timing/performance issue. I reran this AM and it generated with no issues.

Thanks!