Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code generated from local file inherits from System.Data instead of Microsoft.Odata #323

Open
Joe-LaRue opened this issue Oct 31, 2022 · 0 comments

Comments

@Joe-LaRue
Copy link

I am trying to generate code against an authenticated API on my local network, which requires a workaround per the readme:

Question: In Visual Studio 2017, upon configuring the service endpoint in the OData Connected Services extension and clicking "Finish", I get an error message that says "Cannot access".
Workaround: Most reported issues for this error are related to authentication-based endpoints. This extension does not currently support authentication. To work around, download the metadata as a text file from the endpoint and then point the OData Connected Services URI to the downloaded file.

when i generate the client code, the instance of DataServiceContext is coming from System.Data.Services.Client instead of Microsoft.OData.Client.DataServiceContext

When i use the TripPin sample, which doesnt require authentication and can be done directly from the URL, Microsoft.OData.Client.DataServiceContext is used.

I do see in the metadata file that i'm using a node that is identified as the DefaultEntityContainer - could that be related?

image

Is there something i can be doing differently?

Local File metadata class:
image

Url metadata class:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant