OksXen / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that application framework.
http://www.orchardproject.net/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

HTTP Error 500 After Clicking Finish Setup Button #1

Open OksXen opened 5 years ago

OksXen commented 5 years ago

When a specific connection string is used for SQL Server during the initial setup page, the web site returns HTTP Error 500 after clicking on "Finish Setup" button.

There is no log being created in the /App_Data folder.

DSN throws 500: Data Source=ComputerName\InstanceName;Initial Catalog=Sandbox_OCCMS_1;User Id=orchard;Password=orchard

DSN that display proper message. Data Source=computername;Initial Catalog=Sandbox_OCCMS_1;User Id=orchard;Password=orchard

image

image

OksXen commented 5 years ago

Two issues found

  1. Shell Descriptor is returning a value that is coming from the DB, with SerialNumber 2. 1.1 The DB contained some data. There must had been incomplete setup and is the reason there is some data.
  2. The page just returns 500 instead of a generic 500 page.

Filename: OrchardCore.Environment.Shell.Data.Descriptors.ShellDescriptorManager : Starts Line 84 var shellDescriptorRecord = await GetShellDescriptorAsync(); var serialNumber = shellDescriptorRecord == null ? 0 : shellDescriptorRecord.SerialNumber; //priorSerialNumber is zero; is hard coded //serialNumber is two; which is coming from db if (priorSerialNumber != serialNumber) { throw new InvalidOperationException("Invalid serial number for shell descriptor"); }

OksXen commented 5 years ago

work around.

  1. Since this is supposed to be an initial setup, clearing the database with all tables should fix the problem. (Drop table sql)
OksXen commented 5 years ago

This is a bug and requires a permanent 'fix' for production.