Address in AddServiceEndpoint #413
Replies: 2 comments
-
@tapizquent I thought I replied somewhere... but if you look here https://github.com/CoreWCF/CoreWCF/blob/main/src/Samples/NetCoreServer/Program.cs#L21 , it's using localhost... also if you have domain joined machine, you can use UseUrls api too.. |
Beta Was this translation helpful? Give feedback.
-
UseUrls isn't needed any more. It gets it from the IServerAddressesFeature than ASP.NET Core populates. So whatever you configure for your HTTP service, CoreWCF just picks up. With the default logging settings, ASP.NET Core outputs the server addresses on the console when you start your service so you can easily see what it uses. |
Beta Was this translation helpful? Give feedback.
-
When setting the service endpoint through
builder.AddServiceEndpoint
, how is the base address obtained?I see in most cases, this is set as:
builder.AddServiceEndpoint<MyService, IMyservice>(basicHttpBinding, "/basichttp");
But my question is, how is the base addresse inferred? Is it taken from the host?
What would be the actual URL? http://hostname/basichttp?
Beta Was this translation helpful? Give feedback.
All reactions