-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I'm trying to create a REST API project using Slik.Cache, code example:
WebApplicationBuilder builder = WebApplication.CreateBuilder();
builder.Host.UseSlik(new SlikOptions
{
Host = new IPEndPoint(IPAddress.Loopback, 3092),
Members = new[] { "localhost:3092", "localhost:3093", "localhost:3094" }
});
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseAuthorization();
app.MapControllers();
app.Run();But I get exception `System.NotSupportedException: 'ConfigureWebHost() is not supported by WebApplicationBuilder.Host. Use the WebApplication returned by WebApplicationBuilder.Build() instead.'.
Do I need to modify something to make it work?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels