33
我已经创建了.NET核心的空 Web应用程序的默认页,在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"
]
}
这里我启动:
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/ –
有没有一个我们可以看到的页面,哪个中间件必须被调用?或者,只是谷歌这一切... – Legends