NetServer 8.2 breaks Authenticate method for previous versions

So, previous versions of NetServer can not connect to an SO8.2 database. The Authenticate() method in previous versions look for the PHYSICALDATABASE table, which has been removed. I'm not sure if this break in compatibility was intentional or not, or if it's just an unintended side effect of the schema change.

Now, the *really* annoying part is that 8.2 has a number of database schema changes (we haven't yet investigated everything), so we can't use an 8.2 version of NetServer to connect to older versions of the SO database either (because it crashes when trying to fetch data from the tables with new columns).

I think I know what the answer will be, but still... is there any way that this could be sorted out so that we don't have to maintain two distinct release branches for every application that connects to SuperOffice using a local NetServer connection? This would presumably require adding the PHYSICALDATABASE table back into the database somehow - Is there any way we can do that in a way so that we can have the Authenticate method working again (since I'm assuming it needs more than just the physical presence of the table itself)?

We've always loved the fact that we didn't have to do this when it came to SuperOffice integrations - That an application written using NetServer DLLs from version 7 (and even SIX in many cases) would still work with SuperOffice 8 without any problems.

RE: NetServer 8.2 breaks Authenticate method for previous versions

We are also very concerned about having to maintain 2 sets of source code for each project we have written for SuperOffice. We have rebuilt several of our projects using 8.1 DLL's and these seem to work in both 8.0 and 8.2, is this a possible solution to this issue?

 

By: Rich Hacker 5 Feb 2018

RE: NetServer 8.2 breaks Authenticate method for previous versions

The breaking changes in 8.2 are there to give you more flexibility in creating & maintaining your own database tables.

Source code is essentially unchanged between 8.0 and 8.2 - NetServer authenticate works the same way as before, and the Services API is backwards compatible back to 7.5. If you have a solution for 8.0 NetServer, you should be able to retarget to the 8.2 NetServer and re-compile without any changes.

Not sure I understand the significance of the old PHYSICALDATABASE schema tables for authentication.

By: Christian Mogensen 5 Feb 2018

RE: NetServer 8.2 breaks Authenticate method for previous versions

I don't know why the Authenticate method in older versions of NetServer needs to check the PHYSICALDATABASE table either, but for whatever reason it does (according to the error message in the log). So an older version of NetServer will crash when attempting to authenticate with an 8.2 database, since that table is now gone. Adding a reference to NetServer 8.2 and connecting to an 8.0 database causes various crashes when retreiving data from tables that have new columns added to them.

Referencing a given NetServer version is well and good for an application that's installed on a single site, or where we're in a position of knowing which SO version every customer is running, but we're not in that position 90% of the time.

We develop and deliver standardised versions of our integrations, and we need to support SuperOffice versions at least all the way back to 7.5, and I believe we still have customers running 7.1 too. In many cases they are staying with old versions of SuperOffice because they have other integrations that will break if SO is upgraded, so in turn that means we still have to support these older versions too.

We'll have to do some further testing to see which versions of NetServer will now fail to authenticate and come back to this topic, but we're already seeing several of our applications crashing at customer sites once they upgrade to SO 8.2.

I will also have a look at Rich Hacker's suggestion and see if Netserver 8.1 will allow us to connect to both 8.2 and 7.5 databases.

I'll try to keep this thread up to date with whatever we find.

By: Eskil Sæter 5 Feb 2018

RE: NetServer 8.2 breaks Authenticate method for previous versions

Update #1:

I just tried adding a reference to NetServer 8.1 and accessing an 8.2 database, and that crashed.

Again, the error message seems to be pointing to the PHYSICALDATABASE table not being present:

Method not found: 'Boolean SuperOffice.CD.DSL.PhysicalDatabase.DatabaseManagement.IsCsExtraField(System.String)'.

at SuperOffice.Data.Dictionary.SoDictionary.LoadFromDatabaseModel(DatabaseModel databaseModel, DatabaseManagement dbm)
at SuperOffice.Data.Dictionary.SoDictionary.Load(SoConnection con) in C:\agent1\_work\34\s\Server\Source\SoDataBase\Data\Dictionary\SoDictionary.cs:line 330
at SuperOffice.Data.SoDatabase.Init(SoConnection con) in C:\agent1\_work\34\s\Server\Source\SoDataBase\Data\SoDatabase.cs:line 1423

By: Eskil Sæter 5 Feb 2018

RE: NetServer 8.2 breaks Authenticate method for previous versions

Update #2:

Tried referencing 8.2 NetServer and connecting to a 7.5 database. Authenticate method crashes. This time with a pretty clearly stated error message, so this is obviously not a bug :) 

Reading DatabaseModel from Pre80 not supported.

at SuperOffice.Data.Dictionary.SoDictionary.ReadDatabaseModelWithFallback(DatabaseManagement dbm) in C:\agent2\_work\13\s\Server\Source\SoDataBase\Data\Dictionary\SoDictionary.cs:line 560
at SuperOffice.Data.Dictionary.SoDictionary.Load(SoConnection con) in C:\agent2\_work\13\s\Server\Source\SoDataBase\Data\Dictionary\SoDictionary.cs:line 329
at SuperOffice.Data.SoDatabase.Init(SoConnection con) in C:\agent2\_work\13\s\Server\Source\SoDataBase\Data\SoDatabase.cs:line 1430

By: Eskil Sæter 5 Feb 2018

RE: NetServer 8.2 breaks Authenticate method for previous versions

Update #3:

Referencing NetServer 8.2 and contacting a 8.0 database. Authenticate works, but retrieving data fails.

Trying to retrieve a contact entity throws an error referencing a missing column:

Invalid column name 'CategoryFamily_id'.

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at SuperOffice.Data.SoCommand.ExecuteReader(Nullable`1 behaviour, Int32 pageSize, Int32 pageWanted) in C:\agent2\_work\13\s\Server\Source\SoDataBase\Data\SoCommand.cs:line 509

By: Eskil Sæter 5 Feb 2018

RE: NetServer 8.2 breaks Authenticate method for previous versions

If I'm missing something obvious, then please point me in the right direction, but as far as I can tell right now:

  • NetServer 8.2 is incompatible with any database from an older version
  • Any previous version of NetServer is incompatible with an 8.2 database

Help?

By: Eskil Sæter 5 Feb 2018

RE: NetServer 8.2 breaks Authenticate method for previous versions

RE: Update #3:

We have the same issues when using 8.1+ DLLs connecting to an 8.0 Database, the error I found this morning was to do with the new column ''Family_Id" on the Category table missing in the old DB structure.

Also, If we use 8.0Dlls to conntect to an 8.1+ database with Custom Tables, we get errors when trying to access these tables, specifically: 'The Given Key was not found in the Dictionary'.

I am currently investigating these issues further and will give an update leter today.

Chjeers

Rich

By: Rich Hacker 5 Feb 2018

RE: NetServer 8.2 breaks Authenticate method for previous versions

Update #4:

Connecting to an 8.2 database using NetServer 8.1. But in this case, the PHYSICALDATABASE table is still present in the database (it wasn't removed during the upgrade).

Same error as before though. It still crashes with an error referencing PhysicalDatabase, even though the table is physically still in the database. If I had to guess, it might be an issue with the checksum value present in the table's row?

 

Method not found: 'Boolean SuperOffice.CD.DSL.PhysicalDatabase.DatabaseManagement.IsCsExtraField(System.String)'.

at SuperOffice.Data.Dictionary.SoDictionary.LoadFromDatabaseModel(DatabaseModel databaseModel, DatabaseManagement dbm)
at SuperOffice.Data.Dictionary.SoDictionary.Load(SoConnection con) in C:\agent1\_work\34\s\Server\Source\SoDataBase\Data\Dictionary\SoDictionary.cs:line 330
at SuperOffice.Data.SoDatabase.Init(SoConnection con) in C:\agent1\_work\34\s\Server\Source\SoDataBase\Data\SoDatabase.cs:line 1423

By: Eskil Sæter 5 Feb 2018

RE: NetServer 8.2 breaks Authenticate method for previous versions

None of the databases we're testing this with have any extra tables added, by the way.

By: Eskil Sæter 5 Feb 2018