NetCoreCMS icon indicating copy to clipboard operation
NetCoreCMS copied to clipboard

Setup With MSSQL

Open aaroncalderon opened this issue 5 years ago • 0 comments

Dear OnnoRokomSoftware,

I was reviewing the software and I attempted to run it on my machine, however, I ran into trouble.

I attempted to use the software with MSSQL. So, I un-commented line#23 off the NetCoreCMS.Web\Views\SetupHome\Index.cshtml.

However, I was lost after that. I was not able to figure out how to successfully complete the setup.

I assume that the setup is configured to play nice with MySQL, but not others at the moment.

I hope that we can find instructions on how to setup the environment for development in the future.

Respectfully.

Update 2019-12-12

  1. I un-commented the line#25 NetCoreCMS.Web\Views\SetupHome\Index.cshtml for MsSqlLocalStorage.
  2. Then, I and added a line right before NetCoreCMS.Framework/Core/Data/DatabaseFactory.cs#L133
builder.UseSqlServer(SetupHelper.ConnectionString, opt => { opt.MigrationsAssembly("NetCoreCMS.Framework"); opt.MigrationsHistoryTable(SetupHelper.TablePrefix + "ef_migration_history"); });
break;

and this got me as far as creating a database on LocalDB.

However, I am not able to get past this.

Update 2019-12-18

Below is the setup.json file. Please not that IsAdminCreateComplete is false.

{
  "IsDbCreateComplete": true,
  "IsAdminCreateComplete": false,
  "SelectedDatabase": "MsSqlLocalStorage",
  "ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=NetCoreCMS.Web.db;Trusted_Connection=True;MultipleActiveResultSets=true",
  "StartupType": "Url",
  "StartupData": "/CmsHome",
  "StartupUrl": "/CmsHome",
  "TablePrefix": "ncc_",
  "EnableCache": false,
  "LoggingLevel": 4,
  "IsMaintenanceMode": false,
  "MaintenanceDownTime": 30,
  "MaintenanceMessage": "Doing Maintenance. Comming back soon...",
  "Language": null
}

Belowis the error message:

An unhandled exception occurred while processing the request. NullReferenceException: Object reference not set to an instance of an object. NetCoreCMS.Framework.Core.Mvc.Filters.NccLanguageFilter.OnActionExecuting(ActionExecutingContext context) in NccLanguageFilter.cs, line 61

aaroncalderon avatar Dec 06 '19 17:12 aaroncalderon