C
C#17mo ago
camel

❔ Configure Web Host Kestrel

I have the following segment in my appsettings.json and it works like a charm for http and http2 (for grpc).
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://localhost:49098",
"Protocols": "Http1AndHttp2"
},
"gRPC": {
"Url": "http://localhost:49099",
"Protocols": "Http2"
}
}
}
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://localhost:49098",
"Protocols": "Http1AndHttp2"
},
"gRPC": {
"Url": "http://localhost:49099",
"Protocols": "Http2"
}
}
}
How do I write this in my Program.cs?
builder.WebHost.UseKestrel(kestrelServerOptions =>
{
//...
});
builder.WebHost.UseKestrel(kestrelServerOptions =>
{
//...
});
1 Reply
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server