|
The following exception happens on Windows Server 2008 with IIS 7, Enterprise SQL Server 2008. However, using an exact copy of the database on Windows 7 using Visual Studio 2010 built in web server, this exception does not get thrown. The exception is triggered by an .Include() on a query. Queries without includes run perfectly. And again, I copied the database to SQL Express 2008 on my local machine and the error does not happen. I thought maybe the foreign key names in the database did not match the EDM schema. However, the .Include() work just fine locally and do not trigger this exception. The .NET Framework is 4 in both environments. Any ideas on what could cause this or on how to get more details of the error?
Caught exception: System.Data.EntityException: Unable to set field/property .... See InnerException for details. ---> System.NullReferenceException: Object reference not set to an instance of an object. at IdeaBlade.EntityModel.NavigationEntityProperty.get_RelationLink() at IdeaBlade.EntityModel.NavigationListEntityProperty`2.GetEntityReference(EntityWrapper wrapper) at IdeaBlade.EntityModel.NavigationListEntityProperty`2.GetValueForSerialization(EntityWrapper ew) at IdeaBlade.EntityModel.NavigationListEntityProperty`2.GetValue(TInstance instance) at lambda_method(Closure , Object ) at System.Data.Objects.Internal.EntityProxyFactory.<>c__DisplayClass5.<CreateBaseGetter>b__4(Object entity) at System.Data.Objects.Internal.PocoPropertyAccessorStrategy.GetNavigationPropertyValue(RelatedEnd relatedEnd) --- End of inner exception stack trace --- at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.HandleException(Exception e, PersistenceFailure failureType) at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.OnExecuteQuery() at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.Execute(IEntityQuery entityQuery, SessionBundle sessionBundle, EntityServer entityServer) at IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle, IEntityQuerySurrogate surrogate) at SyncInvokeFetch(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</entry>
Thanks
Keith
|