I am using Devart Oracle driver calling it using OData endpoint.
On one of the environments I am getting an error:
Data service failure.
An exception was thrown of type DataServiceException.
Message: Internal Server Error. The type 'System.Data.Services.Internal.ProjectedWrapper3' is not a complex type or an entity type.
Source: Microsoft.Data.Services
Help Link:
ErrorCode:
HResult: -2146233079
MessageLanguage: en-US
StatusCode: 500
TargetSite: System.Data.Services.Providers.ResourceType GetNonPrimitiveResourceType(System.Data.Services.Providers.DataServiceProviderWrapper, System.Object)
Exception Type: System.Data.Services.DataServiceException, Microsoft.Data.Services, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Additional Information:
FullName: Validation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null
IdentityName: NT AUTHORITY\NETWORK SERVICE
Stack Trace:
at System.Data.Services.WebUtil.GetNonPrimitiveResourceType(DataServiceProviderWrapper provider, Object obj)
at System.Data.Services.Serializers.EntitySerializer.WriteEntry(IExpandedResult expanded, Object element, Boolean resourceInstanceInFeed, ResourceType expectedType)
at System.Data.Services.Serializers.EntitySerializer.WriteFeedElements(IExpandedResult expanded, QueryResultInfo elements, ResourceType expectedType, String title, Func`1 getRelativeUri, Func`1 getAbsoluteUri, Boolean topLevel)
at System.Data.Services.Serializers.EntitySerializer.WriteTopLevelElements(IExpandedResult expanded, QueryResultInfo elements)
at System.Data.Services.Serializers.Serializer.WriteRequest(QueryResultInfo queryResults)
at System.Data.Services.ResponseBodyWriter.Write(Stream stream)
when executing next request:
var type = modelServiceWrapper.CreateQuery<MyClass>()
.OrderBy(m => m.Subclass.Property1)
.Where(m => m.Id == id && m.Subclass.Property2 == typeToFilterOn)
.Select(m => new {m.Id})
.FirstOrDefault();
Looks like this is an environment specific issue because the same exact IIS folders and the same database work fine on other environments.
Looks like the error message is thrown from here but I can't go deeper and find out why Devart Oracle provider can't handle ProjectedWrapper* object.
Did anybody face issue like that?
Update
Looks like the issue is related to the data or database settings. I tried to point the same code on the same environment to a different database and didn't get the issue.
ProxyCreation id disabled too.