问题
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