* 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:
parent
9b1271ba19
commit
1840d6823b
|
|
@ -25,7 +25,7 @@ namespace HtmlGenerationWebSite
|
||||||
public void Configure(IApplicationBuilder app)
|
public void Configure(IApplicationBuilder app)
|
||||||
{
|
{
|
||||||
app.UseCultureReplacer();
|
app.UseCultureReplacer();
|
||||||
|
app.UseStaticFiles();
|
||||||
app.UseMvc(routes =>
|
app.UseMvc(routes =>
|
||||||
{
|
{
|
||||||
routes.MapRoute(
|
routes.MapRoute(
|
||||||
|
|
@ -41,6 +41,7 @@ namespace HtmlGenerationWebSite
|
||||||
template: "{controller}/{action}/{id?}",
|
template: "{controller}/{action}/{id?}",
|
||||||
defaults: new { controller = "HtmlGeneration_Home", action = "Index" });
|
defaults: new { controller = "HtmlGeneration_Home", action = "Index" });
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@
|
||||||
"version": "1.1.0-preview4-final"
|
"version": "1.1.0-preview4-final"
|
||||||
},
|
},
|
||||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*",
|
"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": {
|
"frameworks": {
|
||||||
"net451": {},
|
"net451": {},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue