I am trying to host aspnet core 2.0 application on Ubuntu Linux. It is working fine on 5000 port but when I change the port to something else like 6000 then ajax response comes null.
I'm using the below code in Program.cs
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("hosting.json", optional: true)
.Build();
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseUrls("http://0.0.0.0:60000", "http://0.0.0.0:60001")
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}
I'm using Nginx as reverse proxy in Ubuntu and when hosted with the default port, the application is working absolutely fine but when I'm trying to change the port the application not working. For now, I'm directly accessing the application without Nginx using Kestrel.