标签:with eve bsp ref app erro core index apc
https://www.cnblogs.com/lonelyxmas/p/10934388.html
net core 2.x MVC配置
public void ConfigureServices(IServiceCollection services)
{
services.addMvc();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env,IConfiguration configurarion,IWelcome welcome)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseStaticFiles();
app.UseMvc(routs =>
{
routs.MapRoute("default", "{controller=Home}/{action=Index}/{id?}");
});
}
net core 3.x MVC配置
public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews(); }
public void Configure(IApplicationBuilder app, IWebHostEnvironment env,IConfiguration configurarion,IWelcome welcome) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); app.UseStaticFiles(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}"); }); }
标签:with eve bsp ref app erro core index apc
原文地址:https://www.cnblogs.com/CelonY/p/11934653.html