Hi,
I am trying to integrate a D365 ODATA service with my .NET API using ODataClient.
Procedure I followed:
1. Get the Metadata of the D365 service in xml file.
2. Create a new OdataClient template and change the MetadataDocumentUri to the local Meta data XML file.
3. Created a ODataHelper class where I have defined an init() method to initialize the context and SendingRequest2.
4. While creating the context
Uri oDataUri = new Uri("https://xxxxxxxx.sandbox.ax.dynamics.com/data", UriKind.Absolute);
var context = new Resources(oDataUri);
5. While creating the object of Resources it is getting error "No string associated with token".
6. In stack trace I can found two other issues.
6.1.
[BadImageFormatException: [C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\ce686153\b7cf7da6\assembly\dl3\56b7906b\ab5b9ec6_864ad401\D365Integration.dll] No string associated with token.]
6.2.
[TypeInitializationException: The type initializer for 'GeneratedEdmModel' threw an exception.]
What I have tried:
Not getting any specific ways to solve this error.
Need your experienced opinion to get rid of this.
Thanks.