码迷,mamicode.com
首页 > Web开发 > 详细

asp.net Core 配置默认

时间:2016-08-07 20:04:56      阅读:415      评论:0      收藏:0      [点我收藏+]

标签:

app.UseFileServer(new FileServerOptions() {
                FileProvider = new PhysicalFileProvider(env.ContentRootPath),
                RequestPath = new PathString(""),
                EnableDefaultFiles = true,//启用默认文件
                EnableDirectoryBrowsing = false//关闭目录浏览
           });

 app.UseMvc(routes => {
                routes.MapRoute(
                   name: "default",
                   template: "{controller}/{action}/{id?}",
                    defaults: new { group = "core", app = "User", controller = "User", action = "index" });//默认打开路径

  

  

asp.net Core 配置默认

标签:

原文地址:http://www.cnblogs.com/WPHP/p/5746818.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!