Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Basic/Binding/Basic/Http/Client/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace CoreWcf.Samples.Http
{
//The service contract is defined using Connected Service "WCF Web Service", generated from the service by the dotnet svcutil tool.
Expand Down
5 changes: 4 additions & 1 deletion Basic/Binding/Basic/Http/Service/CalculatorService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
namespace CoreWcf.Samples.Http
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace CoreWcf.Samples.Http
{
// Service class which implements the service contract interface.
public class CalculatorService : ICalculatorService
Expand Down
4 changes: 3 additions & 1 deletion Basic/Binding/Basic/Http/Service/ICalculatorService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using CoreWCF;

namespace CoreWcf.Samples.Http
Expand Down
3 changes: 3 additions & 0 deletions Basic/Binding/Basic/Http/Service/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
Expand Down
9 changes: 6 additions & 3 deletions Basic/Binding/Basic/Http/Service/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using CoreWCF;
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using CoreWCF;
using CoreWCF.Configuration;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -21,12 +24,12 @@ public void Configure(IApplicationBuilder app)
// Add the Calculator Service
builder.AddService<CalculatorService>(serviceOptions => { })
// Add BasicHttpBinding endpoint
.AddServiceEndpoint<CalculatorService, ICalculatorService>(new BasicHttpBinding(), "/CalculatorService/basicHttp");
.AddServiceEndpoint<CalculatorService, ICalculatorService>(new BasicHttpBinding(), "CalculatorService/basicHttp");

// Configure WSDL to be available
var serviceMetadataBehavior = app.ApplicationServices.GetRequiredService<CoreWCF.Description.ServiceMetadataBehavior>();
serviceMetadataBehavior.HttpGetEnabled = true;
});
}
}
}
}