After the request comes the kestrel (which is your first line of the log).
First, it goes through the middleware pipeline until it reaches the WebApi middleware.
As you can see in the second line of logging: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware . It reached StaticFileMiddleware , not WebApi middleware.
Does staticFileHandler probably find the file in the wwwroot folder and thus return this message? Or even before he tries to check the file system, he checks to see if this is a permitted / known file extension, and it is not, so this is the second log message.
source share