Я создал пустой веб-приложения в .NET Ядра, в wwwroot
У меня есть index.html, который не загружается в качестве страницы по умолчанию, он загружает только тогда, когда я называю его в явном виде.не index.html показывая как страницу по умолчанию
Вот мой project.json
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc"
]
}
Вот мой Startup:
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app)
{
app.UseStaticFiles();
}
// Entry point for the application.
public static void Main(string[] args) => WebApplication.Run<Startup>(args);
}
Хорошо! Ты прав. Он работает, и порядок играет большую роль, что мне не нравится, но ... – DAG
Дополнительная информация. Например, какую библиотеку добавить и какой порядок. http://www.talkingdotnet.com/make-index-html-startup-file-in-aspnet-core/ –
Есть ли страница, где мы можем видеть, какое промежуточное программное обеспечение нужно вызывать, когда? Или, просто google все это ... – Legends