Using WCF connection in Blazor .NET6 throwing error

76 Views Asked by At

I want to use a WCF service into Blazor APP .NET6. I added Connection Service using a .asmx service URL in the project. But while running the Below Code new System.ServiceModel.BasicHttpBinding(), facing a error as

var rsBinding = new System.ServiceModel.BasicHttpBinding();
rsBinding.Security.Mode = BasicHttpSecurityMode.Transport;
rsBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;

'The type initializer for 'System.ServiceModel.Channels.ChannelBindingUtility' threw an exception.'

Error thrown

I want to use the WCF connection to render a SSRS Report URL on the Blazor Page

0

There are 0 best solutions below