* Add "
`Microsoft.AspNetCore.StaticFiles": "1.2.0-*"`
to project,json
Add
`app.UseStaticFiles();`
in the
`public void Configure(IApplicationBuilder app)`
from `Startup` class.

Addresses #5694
This commit is contained in:
Andrei Ignat 2017-01-26 18:18:19 +02:00 committed by Doug Bunting
parent 9b1271ba19
commit 1840d6823b
2 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,7 @@ namespace HtmlGenerationWebSite
public void Configure(IApplicationBuilder app)
{
app.UseCultureReplacer();
app.UseStaticFiles();
app.UseMvc(routes =>
{
routes.MapRoute(
@ -41,6 +41,7 @@ namespace HtmlGenerationWebSite
template: "{controller}/{action}/{id?}",
defaults: new { controller = "HtmlGeneration_Home", action = "Index" });
});
}
public static void Main(string[] args)

View File

@ -13,7 +13,8 @@
"version": "1.1.0-preview4-final"
},
"Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*",
"Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*"
"Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*",
"Microsoft.AspNetCore.StaticFiles": "1.2.0-*"
},
"frameworks": {
"net451": {},