You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to add a WCF service reference from the client. Getting this issue.
// Add the Echo Service
builder.AddService<EchoService>(serviceOptions =>
{
// Set the default host name:port in generated WSDL and the base path for the address
serviceOptions.BaseAddresses.Add(new Uri($"http://{HOST_IN_WSDL}/EchoService"));
serviceOptions.BaseAddresses.Add(new Uri($"https://{HOST_IN_WSDL}/EchoService"));
})
// Add a BasicHttpBinding endpoint
.AddServiceEndpoint<EchoService, IEchoService>(new BasicHttpBinding(), "/basichttp")
.AddServiceEndpoint<EchoService, IEchoService>(new BasicHttpBinding(BasicHttpSecurityMode.Transport), "/basichttp")
// Add NetTcpBinding
.AddServiceEndpoint<EchoService, IEchoService>(new NetTcpBinding(), $"net.tcp://localhost:{NETTCP_PORT}/netTcp");
// Configure WSDL to be available over http & https
var serviceMetadataBehavior =
app.ApplicationServices.GetRequiredService<CoreWCF.Description.ServiceMetadataBehavior>();
serviceMetadataBehavior.HttpGetEnabled = serviceMetadataBehavior.HttpsGetEnabled = true;
To use a net.tcp address you need to have a SOAP endpoint serving requests for IMetadataExchange. WCF does this for you, but this wasn't implemented in CoreWCF. You need to point Add Service Reference to an http url to have it download the wsdl file over http. This should still provide you the bindings for net.tcp as the wsdl contains all bindings for all transports being used.
When I try to add a WCF service reference from the client. Getting this issue.
I run sample projects.
CoreWcf Sample server
The text was updated successfully, but these errors were encountered: