【发布时间】:2017-11-30 15:21:45
【问题描述】:
我创建了一个包含多个应用程序的解决方案,并像这样配置路由:
app.UseMvc(routes =>
{
routes.MapRoute(
name: "ControlPanel",
template: "ControlPanel/{controller=Home}/{action=Index}/{id?}");
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
我可以导航到 ControlPanel 项目,它进入 ihome 控制器,但我显示此错误:
我发现它在项目第一次运行时在我的 program.cs 中设置了基本目录,它是我的主要 Web 应用程序程序集名称 (CustomerProject):
那么现在如何将 ContentDirectory 和 wwwroot 目录更改为新的程序集名称?
【问题讨论】:
标签: c# asp.net asp.net-core