title: CRM 2011 Dicovery Service FaultException
body: <p>I have asked the same question at <a href="http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/d5d00302-8f7b-4efc-873b-c54b3e29749d" rel="nofollow">http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/d5d00302-8f7b-4efc-873b-c54b3e29749d</a> but didn't get an answer. So, I will give another try at stackoverflow.</p>
  
  <p>I was running the example code from the crm 2011 training kit.</p>
  
  <pre><code> var creds = new ClientCredentials();
   var dsp = new DiscoveryServiceProxy( dinfo, creds);
   dsp.Authenticate();
   var orgRequest = new RetrieveOrganizationRequest();
   var response = dsp.Execute(orgRequest);
   var orgResponse = response as RetrieveOrganizationsResponse;
   if (orgResponse != null)
   comboOrgs.ItemsSource = orgResponse.Details;
  </code></pre>
  
  <p>At the line of var response = dsp.Execute(orgRequest), I got the FaltException`1, the detailed message is as follows</p>
  
  <pre><code>System.ServiceModel.FaultException`1 was unhandled
   Message=organizationName
   Source=mscorlib
   Action=http://schemas.microsoft.com/xrm/2011/Contracts/Discovery/IDiscoveryService/ExecuteDiscoveryServiceFaultFault
   StackTrace:
   Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc&amp; 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&amp; msgData, Int32 type)
   at Microsoft.Xrm.Sdk.Discovery.IDiscoveryService.Execute(DiscoveryRequest request)
   at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
  </code></pre>
  
  <p>I was able to access the Discovery.svc file using browser. So the server url should be correct. Is this an authentication problem?</p>