[Blazor Hosted .NET 6] Server is no more returning index.html
Hi,
I've an application I'm developing for I while. Today, after some refactoring, I have that even though application starts correctly, I can e.g. perform REST request to controllers, if I navigate to the endpoint (http://localhost:5254), a 404 is returned.
In the server debug log I found this:
It seems like even though /index.html is under wwwroot, it is not published.
I've an application I'm developing for I while. Today, after some refactoring, I have that even though application starts correctly, I can e.g. perform REST request to controllers, if I navigate to the endpoint (http://localhost:5254), a 404 is returned.
In the server debug log I found this:
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET http://192.168.0.51:5254/ - -
trce: Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware[2]
All hosts are allowed.
trce: Microsoft.AspNetCore.ResponseCompression.ResponseCompressionProvider[3]
This request accepts compression.
dbug: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[4]
The request path / does not match a supported file type
dbug: Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1001]
1 candidate(s) found for the request path '/'
dbug: Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1005]
Endpoint 'Fallback {*path:nonfile}' with route pattern '{*path:nonfile}' is valid for the request path '/'
dbug: Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware[1]
Request matched endpoint 'Fallback {*path:nonfile}'
dbug: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[9]
AuthenticationScheme: Bearer was not authenticated.
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
Executing endpoint 'Fallback {*path:nonfile}'
dbug: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[5]
The request path /index.html does not match an existing file
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
Executed endpoint 'Fallback {*path:nonfile}'
dbug: Microsoft.AspNetCore.Server.Kestrel.Connections[9]
Connection id "0HMKCN544RENL" completed keep alive response.
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 GET http://192.168.0.51:5254/ - - - 404 0 - 68.5228msinfo: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 GET http://192.168.0.51:5254/ - -
trce: Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware[2]
All hosts are allowed.
trce: Microsoft.AspNetCore.ResponseCompression.ResponseCompressionProvider[3]
This request accepts compression.
dbug: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[4]
The request path / does not match a supported file type
dbug: Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1001]
1 candidate(s) found for the request path '/'
dbug: Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1005]
Endpoint 'Fallback {*path:nonfile}' with route pattern '{*path:nonfile}' is valid for the request path '/'
dbug: Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware[1]
Request matched endpoint 'Fallback {*path:nonfile}'
dbug: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[9]
AuthenticationScheme: Bearer was not authenticated.
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
Executing endpoint 'Fallback {*path:nonfile}'
dbug: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[5]
The request path /index.html does not match an existing file
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
Executed endpoint 'Fallback {*path:nonfile}'
dbug: Microsoft.AspNetCore.Server.Kestrel.Connections[9]
Connection id "0HMKCN544RENL" completed keep alive response.
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 GET http://192.168.0.51:5254/ - - - 404 0 - 68.5228msIt seems like even though /index.html is under wwwroot, it is not published.