I created a basic Asp.net core 2.0 web application in the following way:
New Application => ASP.Net Core Web Application => Web Application => (MVC) => Change Authentication => Individual User Accounts (With docker enabled)
Debugging this will give you this:
This will obviously give you a 404, if you get rid of https://localhost:44360/
then the application is debugging there. I've seen this answer, but this didn't work for me.
I created a hosting.json
as the answer suggested:
{
"server": "Microsoft.AspNetCore.Server.Kestrel",
"server.urls": "http://localhost:4000"
}
I added this to the Configure()
method in startup:
var config = new ConfigurationBuilder()
.AddJsonFile("/app/hosting.json", optional: false)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();
var host = new WebHostBuilder()
.UseConfiguration(config)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
This didn't fix my startup issue. What am I doing wrong or what do i need to do to fix this debug issue?