Value cannot be null. Parameter name: detail

Mar 27, 2013 at 11:20 AM
Hi,

i just started developing with CRM 2011, and came across this generater.


After trying i got following Error: Value cannot be null. Parameter name: detail (ArgumentNullExeption)

The Error is thrown here: RetrieveOrganizationsResponse response = (RetrieveOrganizationsResponse)service.Execute(request);

Stack Trace:
 at System.ServiceModel.Dispatcher.FaultContractInfo..ctor(String action, Type detail, XmlName elementName, String ns, IList`1 knownTypes)
   at System.ServiceModel.Description.DispatcherBuilder.BuildProxyOperation(OperationDescription operation, ClientRuntime parent)
   at System.ServiceModel.Description.DispatcherBuilder.BuildProxyBehavior(ServiceEndpoint serviceEndpoint, BindingParameterCollection& parameters)
   at System.ServiceModel.Channels.ServiceChannelFactory.BuildChannelFactory(ServiceEndpoint serviceEndpoint, Boolean useActiveAutoClose)
   at System.ServiceModel.ChannelFactory.CreateFactory()
   at System.ServiceModel.ChannelFactory.OnOpening()
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open()
   at System.ServiceModel.ChannelFactory.EnsureOpened()
   at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
   at System.ServiceModel.ChannelFactory`1.CreateChannel()
   at Microsoft.Xrm.Sdk.Client.ServiceChannel`1.CreateChannel()
   at Microsoft.Xrm.Sdk.Client.ServiceChannel`1.ConfigureNewChannel()
   at Microsoft.Xrm.Sdk.Client.ServiceChannel`1.get_Channel()
   at Microsoft.Xrm.Sdk.Client.ServiceContextInitializer`1.Initialize(ServiceProxy`1 proxy)
   at Microsoft.Xrm.Sdk.Client.ServiceContextInitializer`1..ctor(ServiceProxy`1 proxy)
   at Microsoft.Xrm.Sdk.Client.DiscoveryServiceContextInitializer..ctor(DiscoveryServiceProxy proxy)
   at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
   at CrmCodeGenerator.Core.QuickConnection.DiscoverOrganizations(DiscoveryServiceProxy service) in E:\Projects\crm2011codegen\CrmCodeGenerator.Core\QuickConnection.cs:line 56
   at CrmCodeGenerator.Core.QuickConnection.Connect(String url, String domain, String username, String password, String organization) in E:\Projects\crm2011codegen\CrmCodeGenerator.Core\QuickConnection.cs:line 30
   at CrmCodeGenerator.UI.App.BeginGetCrmConnection(String url, String org, String domain, String username, String password) in E:\Projects\crm2011codegen\CrmCodeGenerator.UI\App.cs:line 76
does someone know why?
Mar 27, 2013 at 11:48 AM
found the problem I used organisation.svc and not discovery.svc