abp icon indicating copy to clipboard operation
abp copied to clipboard

It is not work to modify the listening port

Open wingqing1314 opened this issue 6 years ago • 3 comments

image

internal static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.UseStartup<Startup>();
                    webBuilder.UseUrls("http://localhost:5003", "https://localhost:5004");
                })
                .UseAutofac()
                .UseSerilog();

I changed the port, but the website is still listening 5000

wingqing1314 avatar May 24 '20 07:05 wingqing1314

I can't reproduce your problem, and I think it has nothing with abp, Please check microsoftion document https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/web-host?view=aspnetcore-3.1

image

realLiangshiwei avatar May 24 '20 08:05 realLiangshiwei

image Maybe because of I replaced the configuration.When I comment out the code,it works.

But I don't know why

wingqing1314 avatar May 24 '20 08:05 wingqing1314

@wingqing1314 This issue has nothing to do with abp. You can check the source code of ASPNET Core's UseUrls to see why.

maliming avatar May 25 '20 00:05 maliming