WCF 5.0 and OData API 3.0 do not work with azure table storage

After I migrated the WCF5.0 application to integrate with azure, I cannot use oData 3 api with azure table storage. I got this error -

The type "System.Data.Services.Client.DataServiceResponse" is defined in an assembly that is not referenced. You must add a reference to the assembly 'System.Data.Services.Client, Version = 3.5.0.0, Culture = Neutral, PublicKeyToken = b77a5c561934e089'.

The type "System.Data.Services.Client.DataServiceContext" is defined in an assembly that is not referenced. You must add a reference to the assembly 'System.Data.Services.Client, Version = 3.5.0.0, Culture = Neutral, PublicKeyToken = b77a5c561934e089'.

After adding System.Data.Services.Client.dll in my project, the problems go away, but I can not use oData 3.0.

+6
source share
1 answer

This is the second time that asked this question recently. Microsoft.WindowsAzure.StorageClient.Dll has a direct link to the System.Data.Service.Client.Dll file, as shown below, so if you intend to use the Azure Storage client API, you will need to reference System.Data.Service.Client. Dll in your application and make sure you cannot use the oData 3.0 provided by the WCF 5.0 SDK.

enter image description here

If you can create a web request based on RESTful Interface to Azure Storage directly, you can directly use oData 3.0 + WCF 5.0 in your code, but you may need to work with your legs.

+4
source

Source: https://habr.com/ru/post/917401/


All Articles