While going through the Astoria sample in DO 4.3 RC3 I'm getting this error:

The server encountered an error processing the request. The exception message is 'The property 'Type' is not a valid property name for type 'Server.Model.EntityBase'. Please specify a valid property name.'. See server logs for more details. The exception stack trace is:

at System.Data.Services.IgnorePropertiesAttribute.GetProperties(Type type, Boolean inherit, BindingFlags bindingFlags) at System.Data.Services.Providers.ReflectionServiceProvider.BuildTypeProperties(ResourceType parentResourceType, IDictionary`2 knownTypes, IDictionary`2 childTypes, Queue`1 unvisitedTypes, IEnumerable`1 entitySets) at System.Data.Services.Providers.ReflectionServiceProvider.PopulateMetadata(IDictionary`2 knownTypes, IDictionary`2 childTypes, IDictionary`2 entitySets) at System.Data.Services.DataService`1.CreateProvider() at System.Data.Services.DataService`1.HandleRequest() at System.Data.Services.DataService`1.ProcessRequestForMessage(Stream messageBody) at SyncInvokeProcessRequestForMessage(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.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Any idea why this is happening?


Updated at 21.06.2010 20:39:02

Locate file .../AstoriaSample/Server.Model/EntityBase.cs, and change line with IgnoreProperties into this: [IgnoreProperties("PersistenceState", "Session", "Item", "TypeInfo", "Key", "VersionInfo", "IsRemoved")] as you can see you must change string "Type" with "TypeInfo", this is because DO4.3 rename property "Type" into "TypeInfo" but forgot to change astoria sample i think :-)

Indeed, thanks a lot

This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by samirski.

asked Jun 21 '10 at 17:30

Editor's gravatar image

Editor
46156156157


One Answer:

While going through the Astoria sample in DO 4.3 RC3 I'm getting this error: The server encountered an error processing the request. The exception message is 'The property 'Type' is not a valid property name for type 'Server.Model.EntityBase'. Please specify a valid property name.'. See server logs for more details. The exception stack trace is: at System.Data.Services.IgnorePropertiesAttribute.GetProperties(Type type, Boolean inherit, BindingFlags bindingFlags) at System.Data.Services.Providers.ReflectionServiceProvider.BuildTypeProperties(ResourceType parentResourceType, IDictionary2 knownTypes, IDictionary2 childTypes, Queue1 unvisitedTypes, IEnumerable1 entitySets) at System.Data.Services.Providers.ReflectionServiceProvider.PopulateMetadata(IDictionary2 knownTypes, IDictionary2 childTypes, IDictionary2 entitySets) at System.Data.Services.DataService1.CreateProvider() at System.Data.Services.DataService1.HandleRequest() at System.Data.Services.DataService1.ProcessRequestForMessage(Stream messageBody) at SyncInvokeProcessRequestForMessage(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.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) Any idea why this is happening?

Locate file .../AstoriaSample/Server.Model/EntityBase.cs, and change line with IgnoreProperties into this:

[IgnoreProperties("PersistenceState", "Session", "Item", "TypeInfo", "Key", "VersionInfo", "IsRemoved")]

as you can see you must change string "Type" with "TypeInfo", this is because DO4.3 rename property "Type" into "TypeInfo" but forgot to change astoria sample i think :-)


I think this little change for Astoria sample should be fixed locally, just make somewhere some description (maybe mine) how to fix and run Astoria sample with DO4.3 :-)

answered Jun 21 '10 at 18:59

Peter%20%C5%A0ulek's gravatar image

Peter Ĺ ulek
492313236

Ups, to be fixed.

(Jun 21 '10 at 18:59) Alex Yakunin Alex%20Yakunin's gravatar image

Fixed. Update is on its way (building).

(Jun 21 '10 at 18:59) Alex Yakunin Alex%20Yakunin's gravatar image

Hmm. Few new failing tests are there (not because of this, of course, but because of today's changes), so this is postponed until we figure out what's wrong, sorry.

(Jun 21 '10 at 18:59) Alex Yakunin Alex%20Yakunin's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA