Fix ASP.NET Core port number on Service Fabric

less than 1 minute read

If you create a stateless core api as service fabric service, the port number changes each time you restart the service fabric service. It’s quite annoying that your postman requests start failing because the port number has changed. To fix it, you have to override the resource, specifying the port number.

    <ServiceManifestRef ServiceManifestName="Web1Pkg" ServiceManifestVersion="1.0.0" />
        <Endpoint Name="ServiceEndpoint" Port="8001"/>
    <ConfigOverrides />