Kentico 12 DancingGoat MVC站点名称为空或空

时间:2018-12-27 22:51:09

标签: kentico

我已经安装了DancingGoat MVC,并且可以正常访问IIS网址

http://localhost:8080/Kentico12_DancingGoatMvc

http://localhost:8080/Kentico12_Admin/Admin/cmsadministration.aspx

当我尝试调试MVC应用程序以查看示例站点的内部工作方式时,在StartUp.auh.cs文件中,我得到 SiteName is empty or null exception

例外情况在下一行

// Register Kentico Membership identity implementation
app.CreatePerOwinContext(() => UserManager.Initialize(app, new UserManager(new UserStore(SiteContext.CurrentSiteName))));

我该如何纠正?

1 个答案:

答案 0 :(得分:3)

您可能会在Visual Studio中将MVC项目设置为在不同于:8080的端口下启动。打开MVC项目的属性,转到Web选项卡,并在“项目URL”字段的http://localhost之后记下端口。然后,回到Kentico,转到“网站”工具,为Dancing Goat网站添加URL和端口到您网站的域别名(或更改网站设置中的默认值)。重新启动所有内容,您应该一切顺利。除非有限制,否则请确保您具有站点和本地主机等的有效许可证。