How to change the port number for Asp.Net core app? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!How to specify the port an ASP.NET Core application is hosted on?Microsoft Edge broswer not working with web listener ASP.NET 5.0 DNXaspnet5 rc1 dnx configurationhow to deploy .net core web api to linux machineCannot debug in Visual Studio after changing the port number?Configurable port number when using Kestrel?Remotely connect to .net core self hosted web apiRunning the basic .NET Core MVC App on SSL, HTTPS inside Docker Containerrunning an asp.net core 2.0 app remotely executed in a server by using dotnet CLIASP.Net Core application service only listening to Port 5000 on UbuntuHow to run asp.net core 2.1 release app at a specific port?

Putting class ranking in CV, but against dept guidelines

What would you call this weird metallic apparatus that allows you to lift people?

Is there public access to the Meteor Crater in Arizona?

What does 丫 mean? 丫是什么意思?

Does the Mueller report show a conspiracy between Russia and the Trump Campaign?

Google .dev domain strangely redirects to https

As a dual citizen, my US passport will expire one day after traveling to the US. Will this work?

Is it dangerous to install hacking tools on my private linux machine?

What is the difference between a "ranged attack" and a "ranged weapon attack"?

Getting out of while loop on console

How can a team of shapeshifters communicate?

What are the main differences between the original Stargate SG-1 and the Final Cut edition?

Trying to understand entropy as a novice in thermodynamics

A `coordinate` command ignored

Can an iPhone 7 be made to function as a NFC Tag?

Moving a wrapfig vertically to encroach partially on a subsection title

Co-worker has annoying ringtone

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

One-one communication

Tannaka duality for semisimple groups

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Universal covering space of the real projective line?

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

New Order #6: Easter Egg



How to change the port number for Asp.Net core app?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!How to specify the port an ASP.NET Core application is hosted on?Microsoft Edge broswer not working with web listener ASP.NET 5.0 DNXaspnet5 rc1 dnx configurationhow to deploy .net core web api to linux machineCannot debug in Visual Studio after changing the port number?Configurable port number when using Kestrel?Remotely connect to .net core self hosted web apiRunning the basic .NET Core MVC App on SSL, HTTPS inside Docker Containerrunning an asp.net core 2.0 app remotely executed in a server by using dotnet CLIASP.Net Core application service only listening to Port 5000 on UbuntuHow to run asp.net core 2.1 release app at a specific port?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








14















I added the following section in project.json.



 "commands": 
"run": "run server.urls=http://localhost:8082",
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:8082",
"weblistener": "Microsoft.AspNet.Hosting --server WebListener --server.urls http://localhost:8082"
,


However, it still shows "Now listening on: http://localhost:5000" when run it using dotnet myapp.dll?



BTW, will clients from other machine be able to access the service?










share|improve this question






















  • Possible duplicate of How to specify the port an ASP.NET Core application is hosted on?

    – Set
    Aug 4 '16 at 6:10











  • The "commands" property is not used by dotnet anymore, which explains why it doesn't work.

    – svick
    Aug 4 '16 at 11:32












  • Config port in appsettings.json

    – menxin
    Mar 26 at 14:17


















14















I added the following section in project.json.



 "commands": 
"run": "run server.urls=http://localhost:8082",
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:8082",
"weblistener": "Microsoft.AspNet.Hosting --server WebListener --server.urls http://localhost:8082"
,


However, it still shows "Now listening on: http://localhost:5000" when run it using dotnet myapp.dll?



BTW, will clients from other machine be able to access the service?










share|improve this question






















  • Possible duplicate of How to specify the port an ASP.NET Core application is hosted on?

    – Set
    Aug 4 '16 at 6:10











  • The "commands" property is not used by dotnet anymore, which explains why it doesn't work.

    – svick
    Aug 4 '16 at 11:32












  • Config port in appsettings.json

    – menxin
    Mar 26 at 14:17














14












14








14


4






I added the following section in project.json.



 "commands": 
"run": "run server.urls=http://localhost:8082",
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:8082",
"weblistener": "Microsoft.AspNet.Hosting --server WebListener --server.urls http://localhost:8082"
,


However, it still shows "Now listening on: http://localhost:5000" when run it using dotnet myapp.dll?



BTW, will clients from other machine be able to access the service?










share|improve this question














I added the following section in project.json.



 "commands": 
"run": "run server.urls=http://localhost:8082",
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:8082",
"weblistener": "Microsoft.AspNet.Hosting --server WebListener --server.urls http://localhost:8082"
,


However, it still shows "Now listening on: http://localhost:5000" when run it using dotnet myapp.dll?



BTW, will clients from other machine be able to access the service?







asp.net-core .net-core






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 4 '16 at 0:03









ca9163d9ca9163d9

8,4692696212




8,4692696212












  • Possible duplicate of How to specify the port an ASP.NET Core application is hosted on?

    – Set
    Aug 4 '16 at 6:10











  • The "commands" property is not used by dotnet anymore, which explains why it doesn't work.

    – svick
    Aug 4 '16 at 11:32












  • Config port in appsettings.json

    – menxin
    Mar 26 at 14:17


















  • Possible duplicate of How to specify the port an ASP.NET Core application is hosted on?

    – Set
    Aug 4 '16 at 6:10











  • The "commands" property is not used by dotnet anymore, which explains why it doesn't work.

    – svick
    Aug 4 '16 at 11:32












  • Config port in appsettings.json

    – menxin
    Mar 26 at 14:17

















Possible duplicate of How to specify the port an ASP.NET Core application is hosted on?

– Set
Aug 4 '16 at 6:10





Possible duplicate of How to specify the port an ASP.NET Core application is hosted on?

– Set
Aug 4 '16 at 6:10













The "commands" property is not used by dotnet anymore, which explains why it doesn't work.

– svick
Aug 4 '16 at 11:32






The "commands" property is not used by dotnet anymore, which explains why it doesn't work.

– svick
Aug 4 '16 at 11:32














Config port in appsettings.json

– menxin
Mar 26 at 14:17






Config port in appsettings.json

– menxin
Mar 26 at 14:17













6 Answers
6






active

oldest

votes


















25














Yes this will be accesible from other machines if you bind on any external IP address. For example binding to http://*:80 . Note that binding to http://localhost:80 will only bind on 127.0.0.1 interface and therefore will not be accesible from other machines.



Visual Studio is overriding your port. You can change VS port editing this file PropertieslaunchSettings.json or else set it by code:



 var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.UseUrls("http://*:80") // <-----
.Build();

host.Run();


A step by step guide using an external config file is available here.






share|improve this answer

























  • In addition, one can check the Microsoft's reference on overriding configuration at Overriding configuration

    – Ivan Maia
    May 9 '18 at 20:50



















10














In Asp.net core 2.0 WebApp, if you are using visual studio search LaunchSettings.json. I am adding my LaunchSettings.json, you can change port no as u can see.



enter image description here






share|improve this answer






























    2














    In visual studio 2017 we can change the port number from LaunchSetting.json



    In Properties-> LaunchSettings.json.



    Open LaunchSettings.json and change the Port Number.



    Launch



    Change the port Number in json file



    enter image description here






    share|improve this answer






























      1














      We can use this command to run our host project via Windows Powershell without IIS and visual studio on a separate port. Default of krestel web server is 5001



      $env:ASPNETCORE_URLS="http://localhost:22742" ; dotnet run





      share|improve this answer






























        0














        you can also code like this



         IConfiguration config = new ConfigurationBuilder()
        .AddCommandLine(args)
        .Build();
        var host = new WebHostBuilder()
        .UseConfiguration(config)
        .UseKestrel()
        .UseContentRoot(Directory.GetCurrentDirectory())
        .UseStartup<Startup>()
        .Build();


        and set up your application by command line :dotnet run --server.urls http://*:5555






        share|improve this answer























        • Nice! But this only works from command line. Do you know how/why from Visual Studio the port is overriden?

          – Gerardo Grignoli
          Aug 4 '16 at 22:16












        • ConfigurationBuilder hasn't definition AddCommandLine. Curtains down.

          – alerya
          Apr 5 '17 at 3:13











        • @GerardoGrignoli If launching you app from within Visual Studio, the Properties/launchSettings.json file will be used to set the url and port.

          – EL MOJO
          Aug 16 '17 at 23:32



















        0














        Go to your program.cs file add UseUrs method to set your url, make sure you don't use a reserved url or port



         public class Program

        public static void Main(string[] args)

        BuildWebHost(args).Run();


        public static IWebHost BuildWebHost(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
        .UseStartup<Startup>()

        // params string[] urls
        .UseUrls(urls: "http://localhost:10000")

        .Build();






        share|improve this answer























          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38755516%2fhow-to-change-the-port-number-for-asp-net-core-app%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          6 Answers
          6






          active

          oldest

          votes








          6 Answers
          6






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          25














          Yes this will be accesible from other machines if you bind on any external IP address. For example binding to http://*:80 . Note that binding to http://localhost:80 will only bind on 127.0.0.1 interface and therefore will not be accesible from other machines.



          Visual Studio is overriding your port. You can change VS port editing this file PropertieslaunchSettings.json or else set it by code:



           var host = new WebHostBuilder()
          .UseKestrel()
          .UseContentRoot(Directory.GetCurrentDirectory())
          .UseIISIntegration()
          .UseStartup<Startup>()
          .UseUrls("http://*:80") // <-----
          .Build();

          host.Run();


          A step by step guide using an external config file is available here.






          share|improve this answer

























          • In addition, one can check the Microsoft's reference on overriding configuration at Overriding configuration

            – Ivan Maia
            May 9 '18 at 20:50
















          25














          Yes this will be accesible from other machines if you bind on any external IP address. For example binding to http://*:80 . Note that binding to http://localhost:80 will only bind on 127.0.0.1 interface and therefore will not be accesible from other machines.



          Visual Studio is overriding your port. You can change VS port editing this file PropertieslaunchSettings.json or else set it by code:



           var host = new WebHostBuilder()
          .UseKestrel()
          .UseContentRoot(Directory.GetCurrentDirectory())
          .UseIISIntegration()
          .UseStartup<Startup>()
          .UseUrls("http://*:80") // <-----
          .Build();

          host.Run();


          A step by step guide using an external config file is available here.






          share|improve this answer

























          • In addition, one can check the Microsoft's reference on overriding configuration at Overriding configuration

            – Ivan Maia
            May 9 '18 at 20:50














          25












          25








          25







          Yes this will be accesible from other machines if you bind on any external IP address. For example binding to http://*:80 . Note that binding to http://localhost:80 will only bind on 127.0.0.1 interface and therefore will not be accesible from other machines.



          Visual Studio is overriding your port. You can change VS port editing this file PropertieslaunchSettings.json or else set it by code:



           var host = new WebHostBuilder()
          .UseKestrel()
          .UseContentRoot(Directory.GetCurrentDirectory())
          .UseIISIntegration()
          .UseStartup<Startup>()
          .UseUrls("http://*:80") // <-----
          .Build();

          host.Run();


          A step by step guide using an external config file is available here.






          share|improve this answer















          Yes this will be accesible from other machines if you bind on any external IP address. For example binding to http://*:80 . Note that binding to http://localhost:80 will only bind on 127.0.0.1 interface and therefore will not be accesible from other machines.



          Visual Studio is overriding your port. You can change VS port editing this file PropertieslaunchSettings.json or else set it by code:



           var host = new WebHostBuilder()
          .UseKestrel()
          .UseContentRoot(Directory.GetCurrentDirectory())
          .UseIISIntegration()
          .UseStartup<Startup>()
          .UseUrls("http://*:80") // <-----
          .Build();

          host.Run();


          A step by step guide using an external config file is available here.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 4 '16 at 0:24

























          answered Aug 4 '16 at 0:18









          Gerardo GrignoliGerardo Grignoli

          7,30733649




          7,30733649












          • In addition, one can check the Microsoft's reference on overriding configuration at Overriding configuration

            – Ivan Maia
            May 9 '18 at 20:50


















          • In addition, one can check the Microsoft's reference on overriding configuration at Overriding configuration

            – Ivan Maia
            May 9 '18 at 20:50

















          In addition, one can check the Microsoft's reference on overriding configuration at Overriding configuration

          – Ivan Maia
          May 9 '18 at 20:50






          In addition, one can check the Microsoft's reference on overriding configuration at Overriding configuration

          – Ivan Maia
          May 9 '18 at 20:50














          10














          In Asp.net core 2.0 WebApp, if you are using visual studio search LaunchSettings.json. I am adding my LaunchSettings.json, you can change port no as u can see.



          enter image description here






          share|improve this answer



























            10














            In Asp.net core 2.0 WebApp, if you are using visual studio search LaunchSettings.json. I am adding my LaunchSettings.json, you can change port no as u can see.



            enter image description here






            share|improve this answer

























              10












              10








              10







              In Asp.net core 2.0 WebApp, if you are using visual studio search LaunchSettings.json. I am adding my LaunchSettings.json, you can change port no as u can see.



              enter image description here






              share|improve this answer













              In Asp.net core 2.0 WebApp, if you are using visual studio search LaunchSettings.json. I am adding my LaunchSettings.json, you can change port no as u can see.



              enter image description here







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Apr 12 '18 at 11:32









              GirishBabuCGirishBabuC

              524615




              524615





















                  2














                  In visual studio 2017 we can change the port number from LaunchSetting.json



                  In Properties-> LaunchSettings.json.



                  Open LaunchSettings.json and change the Port Number.



                  Launch



                  Change the port Number in json file



                  enter image description here






                  share|improve this answer



























                    2














                    In visual studio 2017 we can change the port number from LaunchSetting.json



                    In Properties-> LaunchSettings.json.



                    Open LaunchSettings.json and change the Port Number.



                    Launch



                    Change the port Number in json file



                    enter image description here






                    share|improve this answer

























                      2












                      2








                      2







                      In visual studio 2017 we can change the port number from LaunchSetting.json



                      In Properties-> LaunchSettings.json.



                      Open LaunchSettings.json and change the Port Number.



                      Launch



                      Change the port Number in json file



                      enter image description here






                      share|improve this answer













                      In visual studio 2017 we can change the port number from LaunchSetting.json



                      In Properties-> LaunchSettings.json.



                      Open LaunchSettings.json and change the Port Number.



                      Launch



                      Change the port Number in json file



                      enter image description here







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Mar 22 at 11:51









                      SathishSathish

                      915810




                      915810





















                          1














                          We can use this command to run our host project via Windows Powershell without IIS and visual studio on a separate port. Default of krestel web server is 5001



                          $env:ASPNETCORE_URLS="http://localhost:22742" ; dotnet run





                          share|improve this answer



























                            1














                            We can use this command to run our host project via Windows Powershell without IIS and visual studio on a separate port. Default of krestel web server is 5001



                            $env:ASPNETCORE_URLS="http://localhost:22742" ; dotnet run





                            share|improve this answer

























                              1












                              1








                              1







                              We can use this command to run our host project via Windows Powershell without IIS and visual studio on a separate port. Default of krestel web server is 5001



                              $env:ASPNETCORE_URLS="http://localhost:22742" ; dotnet run





                              share|improve this answer













                              We can use this command to run our host project via Windows Powershell without IIS and visual studio on a separate port. Default of krestel web server is 5001



                              $env:ASPNETCORE_URLS="http://localhost:22742" ; dotnet run






                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jan 27 at 8:59









                              Abdus Salam AzadAbdus Salam Azad

                              721810




                              721810





















                                  0














                                  you can also code like this



                                   IConfiguration config = new ConfigurationBuilder()
                                  .AddCommandLine(args)
                                  .Build();
                                  var host = new WebHostBuilder()
                                  .UseConfiguration(config)
                                  .UseKestrel()
                                  .UseContentRoot(Directory.GetCurrentDirectory())
                                  .UseStartup<Startup>()
                                  .Build();


                                  and set up your application by command line :dotnet run --server.urls http://*:5555






                                  share|improve this answer























                                  • Nice! But this only works from command line. Do you know how/why from Visual Studio the port is overriden?

                                    – Gerardo Grignoli
                                    Aug 4 '16 at 22:16












                                  • ConfigurationBuilder hasn't definition AddCommandLine. Curtains down.

                                    – alerya
                                    Apr 5 '17 at 3:13











                                  • @GerardoGrignoli If launching you app from within Visual Studio, the Properties/launchSettings.json file will be used to set the url and port.

                                    – EL MOJO
                                    Aug 16 '17 at 23:32
















                                  0














                                  you can also code like this



                                   IConfiguration config = new ConfigurationBuilder()
                                  .AddCommandLine(args)
                                  .Build();
                                  var host = new WebHostBuilder()
                                  .UseConfiguration(config)
                                  .UseKestrel()
                                  .UseContentRoot(Directory.GetCurrentDirectory())
                                  .UseStartup<Startup>()
                                  .Build();


                                  and set up your application by command line :dotnet run --server.urls http://*:5555






                                  share|improve this answer























                                  • Nice! But this only works from command line. Do you know how/why from Visual Studio the port is overriden?

                                    – Gerardo Grignoli
                                    Aug 4 '16 at 22:16












                                  • ConfigurationBuilder hasn't definition AddCommandLine. Curtains down.

                                    – alerya
                                    Apr 5 '17 at 3:13











                                  • @GerardoGrignoli If launching you app from within Visual Studio, the Properties/launchSettings.json file will be used to set the url and port.

                                    – EL MOJO
                                    Aug 16 '17 at 23:32














                                  0












                                  0








                                  0







                                  you can also code like this



                                   IConfiguration config = new ConfigurationBuilder()
                                  .AddCommandLine(args)
                                  .Build();
                                  var host = new WebHostBuilder()
                                  .UseConfiguration(config)
                                  .UseKestrel()
                                  .UseContentRoot(Directory.GetCurrentDirectory())
                                  .UseStartup<Startup>()
                                  .Build();


                                  and set up your application by command line :dotnet run --server.urls http://*:5555






                                  share|improve this answer













                                  you can also code like this



                                   IConfiguration config = new ConfigurationBuilder()
                                  .AddCommandLine(args)
                                  .Build();
                                  var host = new WebHostBuilder()
                                  .UseConfiguration(config)
                                  .UseKestrel()
                                  .UseContentRoot(Directory.GetCurrentDirectory())
                                  .UseStartup<Startup>()
                                  .Build();


                                  and set up your application by command line :dotnet run --server.urls http://*:5555







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Aug 4 '16 at 7:06









                                  liamliam

                                  194




                                  194












                                  • Nice! But this only works from command line. Do you know how/why from Visual Studio the port is overriden?

                                    – Gerardo Grignoli
                                    Aug 4 '16 at 22:16












                                  • ConfigurationBuilder hasn't definition AddCommandLine. Curtains down.

                                    – alerya
                                    Apr 5 '17 at 3:13











                                  • @GerardoGrignoli If launching you app from within Visual Studio, the Properties/launchSettings.json file will be used to set the url and port.

                                    – EL MOJO
                                    Aug 16 '17 at 23:32


















                                  • Nice! But this only works from command line. Do you know how/why from Visual Studio the port is overriden?

                                    – Gerardo Grignoli
                                    Aug 4 '16 at 22:16












                                  • ConfigurationBuilder hasn't definition AddCommandLine. Curtains down.

                                    – alerya
                                    Apr 5 '17 at 3:13











                                  • @GerardoGrignoli If launching you app from within Visual Studio, the Properties/launchSettings.json file will be used to set the url and port.

                                    – EL MOJO
                                    Aug 16 '17 at 23:32

















                                  Nice! But this only works from command line. Do you know how/why from Visual Studio the port is overriden?

                                  – Gerardo Grignoli
                                  Aug 4 '16 at 22:16






                                  Nice! But this only works from command line. Do you know how/why from Visual Studio the port is overriden?

                                  – Gerardo Grignoli
                                  Aug 4 '16 at 22:16














                                  ConfigurationBuilder hasn't definition AddCommandLine. Curtains down.

                                  – alerya
                                  Apr 5 '17 at 3:13





                                  ConfigurationBuilder hasn't definition AddCommandLine. Curtains down.

                                  – alerya
                                  Apr 5 '17 at 3:13













                                  @GerardoGrignoli If launching you app from within Visual Studio, the Properties/launchSettings.json file will be used to set the url and port.

                                  – EL MOJO
                                  Aug 16 '17 at 23:32






                                  @GerardoGrignoli If launching you app from within Visual Studio, the Properties/launchSettings.json file will be used to set the url and port.

                                  – EL MOJO
                                  Aug 16 '17 at 23:32












                                  0














                                  Go to your program.cs file add UseUrs method to set your url, make sure you don't use a reserved url or port



                                   public class Program

                                  public static void Main(string[] args)

                                  BuildWebHost(args).Run();


                                  public static IWebHost BuildWebHost(string[] args) =>
                                  WebHost.CreateDefaultBuilder(args)
                                  .UseStartup<Startup>()

                                  // params string[] urls
                                  .UseUrls(urls: "http://localhost:10000")

                                  .Build();






                                  share|improve this answer



























                                    0














                                    Go to your program.cs file add UseUrs method to set your url, make sure you don't use a reserved url or port



                                     public class Program

                                    public static void Main(string[] args)

                                    BuildWebHost(args).Run();


                                    public static IWebHost BuildWebHost(string[] args) =>
                                    WebHost.CreateDefaultBuilder(args)
                                    .UseStartup<Startup>()

                                    // params string[] urls
                                    .UseUrls(urls: "http://localhost:10000")

                                    .Build();






                                    share|improve this answer

























                                      0












                                      0








                                      0







                                      Go to your program.cs file add UseUrs method to set your url, make sure you don't use a reserved url or port



                                       public class Program

                                      public static void Main(string[] args)

                                      BuildWebHost(args).Run();


                                      public static IWebHost BuildWebHost(string[] args) =>
                                      WebHost.CreateDefaultBuilder(args)
                                      .UseStartup<Startup>()

                                      // params string[] urls
                                      .UseUrls(urls: "http://localhost:10000")

                                      .Build();






                                      share|improve this answer













                                      Go to your program.cs file add UseUrs method to set your url, make sure you don't use a reserved url or port



                                       public class Program

                                      public static void Main(string[] args)

                                      BuildWebHost(args).Run();


                                      public static IWebHost BuildWebHost(string[] args) =>
                                      WebHost.CreateDefaultBuilder(args)
                                      .UseStartup<Startup>()

                                      // params string[] urls
                                      .UseUrls(urls: "http://localhost:10000")

                                      .Build();







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Apr 9 at 14:53









                                      Eyayu TeferaEyayu Tefera

                                      12




                                      12



























                                          draft saved

                                          draft discarded
















































                                          Thanks for contributing an answer to Stack Overflow!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid


                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.

                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function ()
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38755516%2fhow-to-change-the-port-number-for-asp-net-core-app%23new-answer', 'question_page');

                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                                          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                                          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현