作家
登录

论HTTP性能,Go与.NET Core一争雌雄

作者: 来源: 2017-10-10 13:48:24 阅读 我要评论

  • using Microsoft.Extensions.DependencyInjection; 
  • namespace netcore_mvc_templates 
  •     public class Startup 
  •     { 
  •         public Startup(IConfiguration configuration) 
  •         { 
  •             Configuration = configuration; 
  •         } 
  •         public IConfiguration Configuration { get; } 
  •         // This method gets called by the runtime. Use this method to add services to the container. 
  •         public void ConfigureServices(IServiceCollection services) 
  •         { 
  •             /*  An unhandled exception was thrown by the application. 
  •                 System.InvalidOperationException: No service for type 
  •                 'Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory' has been registered. 
  •                 Solution: Use AddMvc() instead of AddMvcCore() in Startup.cs and it will work
  •             */ 
  •             // services.AddMvcCore(); 
  •             services.AddMvc(); 
  •         } 
  •         // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 
  •         public void Configure(IApplicationBuilder app, IHostingEnvironment env) 
  •         { 
  •             app.UseStaticFiles(); 
  •             app.UseMvc(routes => 
  •             { 
  •                 routes.MapRoute( 
  •                     name"default"

  •   推荐阅读

      SQL Server 2017正式发布;Oracle宣布开源Fn project

    SQL Server 2017 正式宣布:同时支撑 Windows 和 Linux微软在客岁 3 月初次对外宣布了 Linux 版的 SQL Server,痊愈本年 7 月宣布了首个公开 RC 版。前几日在美国奥兰多召开的微软 Ignit>>>详细阅读


    本文标题:论HTTP性能,Go与.NET Core一争雌雄

    地址:http://www.17bianji.com/lsqh/37756.html

  • 关键词: 探索发现

    乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

    网友点评
    自媒体专栏

    评论

    热度

    精彩导读
    栏目ID=71的表不存在(操作类型=0)