I am playing around with web api in .NET 6. Everything works as expected. However, I am trying to load up a simple HTML/CSS landing page under wwwroot.
I wish to add that I never faced this issue, with .NET 3.0 or .NET 5 which had a similar configuration.
I have my Program.cs
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAuthorization();
app.MapControllers();
app.Run();
Now, if I were to manually visit, localhost/index.html, I get the landing page, both locally and also when deployed on an azure web app.
However, if reach the localhost (or the deployed web app), index.html wont load like it usually does in older versions of .NET.
Am I missing something or is this like a bug?
The full project available here - https://github.com/Jay-study-nildana/CSharpForStudents/tree/main/WebApiDotNet6/DotNet6APIEFCoreSQLite
Note: I have looked at another similar question. I think, its not the same.