I am trying to create the simplest possible ASP.NET 5 project to serve static files, regardless of the Visual Studio project templates. However, when I request a file, I get an empty response. Here is my code:
project.json:
{ "wwwroot": "wwwroot", "dependencies": { "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8", "Microsoft.AspNet.StaticFiles": "1.0.0-beta8" }, "commands": { "web": "Microsoft.AspNet.Server.Kestrel" }, "frameworks": { "dnx46": { } } }
Startup.cs:
using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; namespace Study.StaticFileServer { public class Startup { public void Configure(IApplicationBuilder app) { app.UseStaticFiles(); } } }
Finally, there is a folder called "wwwroot" containing "downloadme.txt".
When I run dnx web and request a file, the answer is empty. What should I add to make this work?
Bryan source share