Kentico 12 DancingGoat MVC SiteName is empty or null

假如想象 提交于 2019-12-11 07:58:51

问题


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

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.

The exception is on following line

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

How can i rectify this?


回答1:


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.



来源:https://stackoverflow.com/questions/53951707/kentico-12-dancinggoat-mvc-sitename-is-empty-or-null

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!