title: WCF 5.0 and Firebird .NET Provider: $expand broken
body: <p>The problem described in the link below (WCF 5.0 &amp; DevArt provider) seems to be also true for the Firebird .NET Provider:</p>
  
  <p><a href="http://social.msdn.microsoft.com/Forums/en/adodotnetdataservices/thread/e74ea4d1-a262-4326-8529-c146a3acfb6d" rel="nofollow">http://social.msdn.microsoft.com/Forums/en/adodotnetdataservices/thread/e74ea4d1-a262-4326-8529-c146a3acfb6d</a></p>
  
  <p>However I've tried the 5.1.0-pre release and still get the ArumentNullException: Value cannot be null. Parameter name: value.</p>
  
  <p>Besides of that the behaviour is exactly the same as described. It did work in the WCF 5.0 CTP, though.</p>
  
  <p>Can anyone confirm that this is a Bug in WCF 5.0 RC or the Firebird .NET Provider? Is there a workaround, or do I have to downgrade to the CTP?</p>
  
  <p>This is the call stack:</p>
  
  <pre><code>Microsoft.Data.Services.dll!System.Data.Services.WebUtil.CheckArgumentNull&lt;string&gt;(string alue, string parameterName) + 0x34 bytes  
  Microsoft.Data.Services.dll!System.Data.Services.Internal.ExpandedWrapper&lt;Mdv.AppGuard.Central.Data.ServerGroup&gt;.ReferenceDescription.set(string value) + 0x33 bytes    
  [Lightweight Function]  
  System.Data.Entity.dll!System.Data.Common.Internal.Materialization.Coordinator&lt;System.Data.Services.Internal.ExpandedWrapper&lt;Mdv.AppGuard.Central.Data.ServerGroup,System.Collections.Generic.IEnumerable&lt;Mdv.AppGuard.Central.Data.Server&gt;&gt;&gt;.ReadNextElement(System.Data.Common.Internal.Materialization.Shaper shaper) + 0x41 bytes   
  System.Data.Entity.dll!System.Data.Common.Internal.Materialization.Shaper&lt;System.Data.Services.Internal.ExpandedWrapper&lt;Mdv.AppGuard.Central.Data.ServerGroup,System.Collections.Generic.IEnumerable&lt;Mdv.AppGuard.Central.Data.Server&gt;&gt;&gt;.RowNestedResultEnumerator.MoveNext() + 0xec bytes  
  System.Data.Entity.dll!System.Data.Common.Internal.Materialization.Shaper&lt;System.Data.Services.Internal.ExpandedWrapper&lt;Mdv.AppGuard.Central.Data.ServerGroup,System.Collections.Generic.IEnumerable&lt;Mdv.AppGuard.Central.Data.Server&gt;&gt;&gt;.ObjectQueryNestedEnumerator.TryReadToNextElement() + 0x11 bytes    
  System.Data.Entity.dll!System.Data.Common.Internal.Materialization.Shaper&lt;System.Data.Services.Internal.ExpandedWrapper&lt;Mdv.AppGuard.Central.Data.ServerGroup,System.Collections.Generic.IEnumerable&lt;Mdv.AppGuard.Central.Data.Server&gt;&gt;&gt;.ObjectQueryNestedEnumerator.MoveNext() + 0x3a bytes    
  Microsoft.Data.Services.dll!System.Data.Services.Providers.BasicExpandProvider.ExpandedEnumerator&lt;System.Data.Services.Internal.ExpandedWrapper&lt;Mdv.AppGuard.Central.Data.ServerGroup,System.Collections.Generic.IEnumerable&lt;Mdv.AppGuard.Central.Data.Server&gt;&gt;&gt;.MoveNext() + 0x23 bytes    
  Microsoft.Data.Services.dll!System.Data.Services.DataService&lt;Mdv.AppGuard.Central.Data.SetupContext&gt;.SerializeResponseBody(System.Data.Services.RequestDescription description, System.Data.Services.IDataService dataService, Microsoft.Data.OData.IODataResponseMessage responseMessage) + 0x246 bytes    
  Microsoft.Data.Services.dll!System.Data.Services.DataService&lt;Mdv.AppGuard.Central.Data.SetupContext&gt;.HandleNonBatchRequest(System.Data.Services.RequestDescription description) + 0x1d8 bytes   
  Microsoft.Data.Services.dll!System.Data.Services.DataService&lt;Mdv.AppGuard.Central.Data.SetupContext&gt;.HandleRequest() + 0x13e bytes  
  Microsoft.Data.Services.dll!System.Data.Services.DataService&lt;Mdv.AppGuard.Central.Data.SetupContext&gt;.ProcessRequestForMessage(System.IO.Stream messageBody) + 0xe3 bytes    
  [Lightweight Function]  
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(object instance, object[] inputs, out object[] outputs) + 0x8c7 bytes   
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(ref System.ServiceModel.Dispatcher.MessageRpc rpc) + 0x243 bytes    
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(ref System.ServiceModel.Dispatcher.MessageRpc rpc) + 0x9f bytes 
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(ref System.ServiceModel.Dispatcher.MessageRpc rpc) + 0xa2 bytes    
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(ref System.ServiceModel.Dispatcher.MessageRpc rpc) + 0xd9 bytes 
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(ref System.ServiceModel.Dispatcher.MessageRpc rpc) + 0x102 bytes   
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(ref System.ServiceModel.Dispatcher.MessageRpc rpc) + 0x99 bytes 
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(ref System.ServiceModel.Dispatcher.MessageRpc rpc) + 0x96 bytes 
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(ref System.ServiceModel.Dispatcher.MessageRpc rpc) + 0x8e4 bytes   
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(ref System.ServiceModel.Dispatcher.MessageRpc rpc) + 0x63 bytes 
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.MessageRpc.Process(bool isOperationContextSet) + 0x122 bytes 
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Dispatch(ref System.ServiceModel.Dispatcher.MessageRpc rpc, bool isOperationContextSet) + 0x49 bytes    
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(System.ServiceModel.Channels.RequestContext request, bool cleanThread, System.ServiceModel.OperationContext currentOperationContext) + 0x5d4 bytes 
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(System.ServiceModel.Channels.RequestContext request, System.ServiceModel.OperationContext currentOperationContext) + 0x226 bytes    
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(System.IAsyncResult result) + 0x77 bytes 
  System.ServiceModel.dll!System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(System.IAsyncResult result) + 0x6a bytes   
  System.Runtime.DurableInstancing.dll!System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult result) + 0x32 bytes  
  System.Runtime.DurableInstancing.dll!System.Runtime.AsyncResult.Complete(bool completedSynchronously) + 0xfd bytes  
  System.Runtime.DurableInstancing.dll!System.Runtime.InputQueue&lt;System.ServiceModel.Channels.RequestContext&gt;.AsyncQueueReader.Set(System.Runtime.InputQueue&lt;System.ServiceModel.Channels.RequestContext&gt;.Item item) + 0x44 bytes 
  System.Runtime.DurableInstancing.dll!System.Runtime.InputQueue&lt;System.ServiceModel.Channels.RequestContext&gt;.EnqueueAndDispatch(System.Runtime.InputQueue&lt;System.ServiceModel.Channels.RequestContext&gt;.Item item, bool canDispatchOnThisThread) + 0x1aa bytes    
  System.Runtime.DurableInstancing.dll!System.Runtime.InputQueue&lt;System.ServiceModel.Channels.RequestContext&gt;.EnqueueAndDispatch(System.ServiceModel.Channels.RequestContext item, System.Action dequeuedCallback, bool canDispatchOnThisThread) + 0x5e bytes 
  System.ServiceModel.dll!System.ServiceModel.Channels.InputQueueChannel&lt;System.ServiceModel.Channels.RequestContext&gt;.EnqueueAndDispatch(System.ServiceModel.Channels.RequestContext item, System.Action dequeuedCallback, bool canDispatchOnThisThread) + 0x46 bytes 
  System.ServiceModel.dll!System.ServiceModel.Channels.SingletonChannelAcceptor&lt;System.ServiceModel.Channels.IReplyChannel,System.ServiceModel.Channels.ReplyChannel,System.ServiceModel.Channels.RequestContext&gt;.Enqueue(System.ServiceModel.Channels.RequestContext item, System.Action dequeuedCallback, bool canDispatchOnThisThread) + 0x68 bytes    
  System.ServiceModel.dll!System.ServiceModel.Channels.SingletonChannelAcceptor&lt;System.ServiceModel.Channels.IReplyChannel,System.ServiceModel.Channels.ReplyChannel,System.ServiceModel.Channels.RequestContext&gt;.Enqueue(System.ServiceModel.Channels.RequestContext item, System.Action dequeuedCallback) + 0x2b bytes  
  System.ServiceModel.dll!System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(System.ServiceModel.Channels.HttpRequestContext context, System.Action callback) + 0x352 bytes 
  System.ServiceModel.dll!System.ServiceModel.Channels.SharedHttpTransportManager.OnGetContextCore(System.IAsyncResult result) + 0x400 bytes  
  System.ServiceModel.dll!System.ServiceModel.Channels.SharedHttpTransportManager.OnGetContext(System.IAsyncResult result) + 0x3d bytes   
  System.Runtime.DurableInstancing.dll!System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult result) + 0x32 bytes  
  System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) + 0x6c bytes    
  System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) + 0xbb bytes  
  System.dll!System.Net.ListenerAsyncResult.WaitCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped) + 0x1f5 bytes    
  mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP) + 0x74 bytes    
  </code></pre>