November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Kristoffer
Unfortunately, I can't replicate the issue. Would you mind sharing full source of your program and startup? Alternatively, you can see my test recording from here https://www.youtube.com/watch?v=KzjKMr3NsgQ to compare with your one.
Hi!
I just figured it out.
I my old solution I was using |DataDirectory| do attach a local database so my connectionstring looked like this:
"EPiServerDB": "Data Source=(LocalDb)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\EPiServerDB_f6c7a112.mdf;Initial Catalog=EPiServerDB_f6c7a112;Connection Timeout=60;Integrated Security=True;MultipleActiveResultSets=True"
To be able to use |DataDirectory| I found some where that you could do this in your Configure:
string baseDir = env.ContentRootPath;
AppDomain.CurrentDomain.SetData("DataDirectory", System.IO.Path.Combine(baseDir, "App_Data"));
It looks like ConfigureCmsDefaults() tries to connect to the database using the current connectionstring and that one is not modified yet.
So I guess there is some kind of exception in ConfigureCmsDefaults() that is not shown that causes the startup to break.
Changing |DataDirectory| to the actuall path to the database made the startup to work correctly.
/Kristoffer
Hi!
I'm trying to upgrade a CMS site and when using .ConfigureCmsDefaults() in Program.cs
the method:
is not called in Startup.cs.
If I remove .ConfigureCmsDefaults() the method get called.
Any ideas?
/Kristoffer