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

Unhandled exception in Blazor WebAssembly Project - .Net5 Preview 8 #46

Open
rahul7720 opened this issue Sep 9, 2020 · 0 comments
Open

Comments

@rahul7720
Copy link

rahul7720 commented Sep 9, 2020

  1. Enabled Odata HTTPClient in Program.cs
    builder.Services.AddODataClient().AddHttpClient(httpClient);

  2. Calling Odata service In the Razor Component OnInitializedAsync Methos: (Odata Connected Service)

            var container= ClientFactory.CreateClient<DefaultContainer>(serviceRoot);
            var records = await container.Incidents.ExecuteAsync();

Below exception is thrown when navigating to the page:

blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Type Microsoft.OData.Extensions.Client.HttpClientRequestMessage has invalid vtable method slot 12 with method none
System.TypeLoadException: Type Microsoft.OData.Extensions.Client.HttpClientRequestMessage has invalid vtable method slot 12 with method none
   at Microsoft.OData.Extensions.Client.ODataClientBuilderExtensions.<>c__DisplayClass4_0.<AddHttpClient>b__0(DataServiceContext context)
   at Microsoft.OData.Extensions.Client.DelegatingODataClientHandler.OnClientCreated(ClientCreatedArgs args)
   at Microsoft.OData.Extensions.Client.DefaultODataClientFactory.OnClientCreated(ClientCreatedArgs args)
   at Microsoft.OData.Extensions.Client.DefaultODataClientFactory.CreateClient[DefaultContainer](Uri serviceRoot, String name)
   at Microsoft.OData.Extensions.Client.ODataClientFactoryExtensions.CreateClient[DefaultContainer](IODataClientFactory factory, Uri serviceRoot)
``
Odata Client Version 7.7.1
Orata Extension Version 1.0.2

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