问题描述
我已经安装了DancingGoat MVC,并且可以正常访问IIS网址
I have installed DancingGoat MVC and i can access the IIS urls just fine
http://localhost:8080/Kentico12_DancingGoatMvc
http://localhost:8080/Kentico12_Admin/Admin/cmsadministration.aspx
当我尝试调试MVC应用程序以查看示例站点的内部工作原理时,在StartUp.auh.cs文件中,我得到 SiteName is empty or null exception
.
When I try to debug the MVC application to look into the inner workings of the sample site, in StartUp.auh.cs file i get SiteName is empty or null exception
.
例外情况在下一行
// Register Kentico Membership identity implementation
app.CreatePerOwinContext(() => UserManager.Initialize(app, new UserManager(new UserStore(SiteContext.CurrentSiteName))));
我该如何纠正?
推荐答案
您可能会在Visual Studio中将MVC项目设置为在不同于:8080的端口下启动.打开MVC项目的属性,转到Web选项卡,并在项目URL"字段中的 http://localhost 之后记下端口.然后,回到Kentico,转到网站"工具,对于Dancing Goat网站,将URL和端口添加到您网站的域别名中(或更改网站设置中的默认值).重新启动所有内容,您应该一切顺利.除此以外,请确保您具有站点和本地主机等的有效许可证.
The MVC project is likely setup in your Visual Studio to launch under a different port than :8080. Open the MVC project's properties, go to the web tab and note the port after http://localhost in the Project URL field. Then, back in Kentico, go to the Sites tool, and for the Dancing Goat site, add the URL and port to your site's domain aliases (or change the default one in the site setting). Relaunch everything and you should be good to go. Barring that, make sure you have a valid license for your site and localhost, etc.
这篇关于Kentico 12 DancingGoat MVC站点名称为空或空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!