Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listening on 5000 and 5001 - why? #6

Open
surfmuggle opened this issue Jul 30, 2018 · 0 comments
Open

Listening on 5000 and 5001 - why? #6

surfmuggle opened this issue Jul 30, 2018 · 0 comments

Comments

@surfmuggle
Copy link

surfmuggle commented Jul 30, 2018

I downloaded the zip file and unzipped it to c:\Dev\GiraffeLunch

c:\Dev\GiraffeLunch>dir
      Directory of c:\Dev\GiraffeLunch

    30/07/2018  15:07    <DIR>          .
    30/07/2018  15:07    <DIR>          ..
    30/07/2018  15:06             1,819 giraffesample.sln
    30/07/2018  15:06             1,071 LICENSE.md
    30/07/2018  15:06    <DIR>          LunchAPI
    30/07/2018  15:06             1,023 README.md
                   3 File(s)          3,913 bytes
                   3 Dir(s)  348,205,043,712 bytes free

I started Visual Studio Code c:\Dev\GiraffeLunch>code . then i changed the fsproj file to remove the watcher reference and bumped most libraries to version 2.1

c:\Dev\GiraffeLunch>dotnet restore
C:\Program     Files\dotnet\sdk\2.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ObsoleteReferences.targets(33,5):     warning : The tool 'Microsoft.DotNet.Watcher.Tools' is now included in the .NET Core SDK. Information     on resolving this warning is available at (https://aka.ms/dotnetclitools-in-box).     [c:\Dev\GiraffeLunch\LunchAPI\LunchApi.fsproj]
  Restore completed in 91.35 ms for c:\Dev\GiraffeLunch\LunchAPI\LunchApi.fsproj.

The i started it

c:\Dev\GiraffeLunch>dotnet run --project LunchAPI/LunchApi.fsproj
Hosting environment: Production
Content root path: c:\Dev\GiraffeLunch\LunchAPI
Now listening on: http://localhost:5000
Now listening on: https://localhost:5001
Application started. Press Ctrl+C to shut down.

I wondered why the application is listening on 5000 and 5001?

After a few searches it seems that this is from the kestrel default configuration:

.UseKestrel(options =>
{
    // ....
    options.Listen(IPAddress.Loopback, 5000);
    options.Listen(IPAddress.Loopback, 5001, listenOptions =>
    {
        listenOptions.UseHttps("testCert.pfx", "testPassword");
    });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant