logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ron@verticalsoftware.net  
#1 Posted : Wednesday, June 19, 2019 6:46:41 PM(UTC)
ron@verticalsoftware.net

Rank: Member

Groups: Registered
Joined: 3/7/2018(UTC)
Posts: 13
United States
Location: Bartonville

Since updating to CP 14.3.2 we can no longer post through the external API. We made the change to target .NET 4.7.2, and on my development machine it works fine, both in Visual Studio IDE and the stand alone application. But the application will not connect to the clients database on their machine. Get the following message:
A connection to the database could not be established, the database or your connection to the server may no longer be valid. Please check your database and server configuration and then try again.
The application resides in the ReflectedDlls like it always has, and was never a problem before.
Has anything changed in the API that would cause this?

So far the only client that has updated to 14.3.2 is River View Farms. They run the CP for AG version. On their server the Center Point Data Browser won't launch either. It gets the following:
A connection to the SQL server/database could not be established.

Edited by user Wednesday, June 19, 2019 6:54:03 PM(UTC)  | Reason: Not specified

aarony  
#2 Posted : Wednesday, June 19, 2019 7:08:27 PM(UTC)
aarony

Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 2/28/2018(UTC)
Posts: 53
Location: Red Wing, MN

Was thanked: 4 time(s) in 4 post(s)
If the Data Browser is also failing to launch then I suspect the problem has to do with the vertical CenterPoint thinks is installed.

If you open the registry and navigate to: \\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Red Wing Software\CenterPoint

There should be a "Vertical" value, this tells the External API (and Data Browser Tool) which vertical of CenterPoint to configure for.

If this is an Ag/Payroll install, perhaps the vertical is in as "Payroll" and should be "Ag"; if this is the case it's usually a result of the products being installed in the incorrect order - in this case, the Agricultural product should have been installed first, then Payroll.

Regards,

- Aaron.
ron@verticalsoftware.net  
#3 Posted : Wednesday, June 19, 2019 7:36:13 PM(UTC)
ron@verticalsoftware.net

Rank: Member

Groups: Registered
Joined: 3/7/2018(UTC)
Posts: 13
United States
Location: Bartonville

The Vertical key in the registry was already set to Ag. We are having the same problem on one of our support girls machine after she updated to 14.3.2. In her case the Data Browser will open, but we can't post using the API. Get the same connection error.
Also on another test server here it's getting the same error. In that case the \\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Red Wing Software\CenterPoint
Vertical=Business which is correct.
aarony  
#4 Posted : Wednesday, June 19, 2019 8:07:09 PM(UTC)
aarony

Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 2/28/2018(UTC)
Posts: 53
Location: Red Wing, MN

Was thanked: 4 time(s) in 4 post(s)
Are you able to open the same database that the External API is attempting to open within CenterPoint manually without an issue on those same PCs?
ron@verticalsoftware.net  
#5 Posted : Wednesday, June 19, 2019 8:20:14 PM(UTC)
ron@verticalsoftware.net

Rank: Member

Groups: Registered
Joined: 3/7/2018(UTC)
Posts: 13
United States
Location: Bartonville

Yep, no problems within CenterPoint
tony  
#6 Posted : Wednesday, June 19, 2019 9:44:46 PM(UTC)
tony

Rank: Advanced Member

Groups: Registered
Joined: 2/28/2018(UTC)
Posts: 65
United States
Location: Pennsylvani mostly

Was thanked: 9 time(s) in 9 post(s)
Just to be sure I understand:

The problem is in the Data Browser?
You have both Ag and Business installed?

It does sound like it's getting the wrong vertical. Normally, applications get this from the registry, but it can be overwritten in the app's config file.

Take the command line version of the Data Browser, the .exe file name is CenterPointDataBrowserConsole.exe. The config file name (in the same folder) is: CenterPointDataBrowserConsole.exe.config

If the config file has a VerticalName section like this, then you should delete the whole line where the VerticalName is set.

<appSettings>
<add key="ApplicationName" value="CenterPoint" />
<add key="VerticalName" value="Business" />
</appSettings>

That said, it doesn't seem likely that installing a new version would have this line, but it's worth a check.



ron@verticalsoftware.net  
#7 Posted : Thursday, June 20, 2019 1:40:14 PM(UTC)
ron@verticalsoftware.net

Rank: Member

Groups: Registered
Joined: 3/7/2018(UTC)
Posts: 13
United States
Location: Bartonville

There is no line with VerticalName in Config file.

We have a couple different situations.

First one is happening on 2 of our test machines. Both running the Business version.
CenterPoint Data Browser works on both of these, but the api won't open the database using OpenDatabase(DatabaseName, Username, Password)
That's using the DataAccessAPI.

2nd one is on River View's system. They run the Ag version. CP Data Browser won't open at all. Get's A connection to the SQL Server/Database could not be established. Api also won't connect. Gets A connection to the database could not be established.

But the 3rd one, My Dev machine, it all works fine, both by running in the VS IDE and running the stand alone exe. Currently it's setup to post to the Business, but I am also able setup Ag version and open it fine.
tony  
#8 Posted : Thursday, June 20, 2019 2:25:17 PM(UTC)
tony

Rank: Advanced Member

Groups: Registered
Joined: 2/28/2018(UTC)
Posts: 65
United States
Location: Pennsylvani mostly

Was thanked: 9 time(s) in 9 post(s)
With the test machines, when you open the Data Browser, does it open a dialog in which you have to specify a user name and password? Of course, you'd have to supply the same user name and password in your application's OpenDatabase because it's not going to be able to pop up an Open Database dialog to ask you for that information.

Your code that calls DataAccessAPI's OpenDatabase method fails, right? I don't suppose that application has a .config file with the vertical set?

I've been talking to Aaron about this and the only thing we can think of trying is to run your code snippet on a test machine here. We'd need your <yourapp>.exe.config and the code snippet that opens the database.

I've also searched to see what changes we've made to the Data Browser. Looks like the only changes since June 2, 2017 we when I put a version number into the Data Browser's main form's text. And, of course, in January, 2019 when we updated to .NET 4.7.2 (which didn't involve any code changes).

aarony  
#9 Posted : Thursday, June 20, 2019 3:04:06 PM(UTC)
aarony

Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 2/28/2018(UTC)
Posts: 53
Location: Red Wing, MN

Was thanked: 4 time(s) in 4 post(s)
The error you are receiving on the River View's system is only thrown when testing the SQL connection to the database.
At this point, the Database in CenterPoint has been identified and information about it and the SQL server have been used to create a connection string which is then tested.

Given that, it would seem in this specific case the connection string is invalid, suggesting either the SQL instance is inaccessible from the workstation (perhaps a firewall issue) or the credentials used to access the SQL instance are not valid. If you are using Windows Authentication, make sure your application is running under the same identity as CenterPoint (assuming you are able to open the database in CenterPoint on this workstation), if it is elevating to an administrative user account or running as a different user than the one running CenterPoint, the identity may not have the necessary access rights to the SQL Server instance.

- Aaron.
ron@verticalsoftware.net  
#10 Posted : Thursday, June 20, 2019 5:23:37 PM(UTC)
ron@verticalsoftware.net

Rank: Member

Groups: Registered
Joined: 3/7/2018(UTC)
Posts: 13
United States
Location: Bartonville

I made a simple program that allows you to select the database, type in user name and password and connect to the database. Found out something interesting. Of course it always works on my machine. But if I put it on one of the test machines first time you click connect, I get A connection to the database cannot be established. But then if you click connect again it will connect. Third time it won't, 4th it will.

I'll send you the code, but I can't seem to figure out how to upload it through the forum.
aarony  
#11 Posted : Thursday, June 20, 2019 5:36:50 PM(UTC)
aarony

Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 2/28/2018(UTC)
Posts: 53
Location: Red Wing, MN

Was thanked: 4 time(s) in 4 post(s)
Originally Posted by: ron@verticalsoftware.net Go to Quoted Post
I'll send you the code, but I can't seem to figure out how to upload it through the forum.

You should be able to send an attachment using the private messaging feature (PM.)

- Aaron.

aarony  
#12 Posted : Thursday, June 20, 2019 8:15:09 PM(UTC)
aarony

Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 2/28/2018(UTC)
Posts: 53
Location: Red Wing, MN

Was thanked: 4 time(s) in 4 post(s)
I installed CenterPoint Accounting (Business) 14.3.2 on a test machine and was able to run your tool without any issues.

I've uploaded a special build of the RedWingSoftware.MainCBL.L0.V1.DLL file to the same location I had you upload your files.
This includes some additional error trapping that may help us pinpoint the problem.

  • Rename your copy of this file in the "ReflectedDLLs" folder

  • Copy this test version of the file into the same folder (do not delete or overwrite your original file.)

  • Try your tests again to replicate the error - you should get additional information about the underlying issue.

  • Remove the test version of the DLL and replace it with your original copy (this file is not production ready and will interfere with any future updates.)

  • Let us know what the additional text of the error is.


Regards,

- Aaron.
ron@verticalsoftware.net  
#13 Posted : Thursday, June 20, 2019 8:36:55 PM(UTC)
ron@verticalsoftware.net

Rank: Member

Groups: Registered
Joined: 3/7/2018(UTC)
Posts: 13
United States
Location: Bartonville

A connection to the database could not be established, the database or your
connection to the server may no longer be valid.

Please check your database and server configuration and then try again.

Error: Unable to load one or more of the requested types. Retrieve the
LoaderExceptions property for more information.
aarony  
#14 Posted : Friday, June 21, 2019 1:02:09 PM(UTC)
aarony

Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 2/28/2018(UTC)
Posts: 53
Location: Red Wing, MN

Was thanked: 4 time(s) in 4 post(s)
Based on this new information, I feel like there may be some out-dated DLLs in <Program Files>\Red Wing Software\CenterPoint\ folders.

My recommendation would be to rename "<Program Files>\Red Wing Software\CenterPoint" and then do a repair of the CenterPoint installation(s) on the PC.
This will insure that only the expected DLLs are installed.
Then drop your app into the ReflectedDLLs folder and try it again.

We have had one or two customers run into this with the 14.x release; we removed components in this version and updated other 3rd party components but for some unknown reason in these instances the files never got updated or removed with the new installation.


- Aaron.
ron@verticalsoftware.net  
#15 Posted : Friday, June 21, 2019 2:01:56 PM(UTC)
ron@verticalsoftware.net

Rank: Member

Groups: Registered
Joined: 3/7/2018(UTC)
Posts: 13
United States
Location: Bartonville

Well, think were on to something, that worked after the rename of folder and repair. API worked fine. But I guess the machines that have the problem also have payroll installed (didn't know that), so I did a repair on the Payroll install, and then the problem appeared again.
aarony  
#16 Posted : Friday, June 21, 2019 2:09:23 PM(UTC)
aarony

Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 2/28/2018(UTC)
Posts: 53
Location: Red Wing, MN

Was thanked: 4 time(s) in 4 post(s)
OK, so in that scenario the likely problem is that the version of CenterPoint Payroll installed is not the same version as Ag/Business which makes them incompatible.
If you have updated the vertical to 14.3, then you will also need to upgrade Payroll to 14.3.

- Aaron.
ron@verticalsoftware.net  
#17 Posted : Friday, June 21, 2019 2:15:03 PM(UTC)
ron@verticalsoftware.net

Rank: Member

Groups: Registered
Joined: 3/7/2018(UTC)
Posts: 13
United States
Location: Bartonville

Payroll is 14.3.2 also. They were both updated from the online updates.
aarony  
#18 Posted : Friday, June 21, 2019 2:51:42 PM(UTC)
aarony

Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 2/28/2018(UTC)
Posts: 53
Location: Red Wing, MN

Was thanked: 4 time(s) in 4 post(s)
Interesting, I can replicate this now if I too install Payroll on a test machine.
OK, we will dig into this and keep you updated.

- Aaron.
ron@verticalsoftware.net  
#19 Posted : Friday, June 21, 2019 2:57:19 PM(UTC)
ron@verticalsoftware.net

Rank: Member

Groups: Registered
Joined: 3/7/2018(UTC)
Posts: 13
United States
Location: Bartonville

Ok, Thanks.
Riverview is wanting to know when they can post their Checks and Invoices, so I'll hold them off for a while.
I know I could rename/repair CP Ag, do the postings and then repair payroll, but we'll wait to see what you find out.
aarony  
#20 Posted : Friday, June 21, 2019 3:17:27 PM(UTC)
aarony

Rank: Administration

Groups: Administrators, Moderator, Registered
Joined: 2/28/2018(UTC)
Posts: 53
Location: Red Wing, MN

Was thanked: 4 time(s) in 4 post(s)
We're still working on the why, but I believe we have a short-term solution for you.

It seems the inclusion of the Payroll components is causing the API to look for a referenced DLL that is not in the ReflectedDLLs folder.
So, if you move your application to the "CenterPoint" folder instead of the "CenterPoint\ReflectedDLLs" folder and then modify your executable ".config" file to include the following in the <runtime> section:

Code:
<probing privatePath="ReflectedDlls"/>


That should resolve your problem - at least it did on my test machine where I'd replicated your situation.

- Aaron.
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.