Problem
Solution
Fix #1:
The first thing you want to do when data is missing in the MPBM app, is check al connection strings. Here are some of the most common places where things can go wrong.
Check #1: SQL Management Studio: ApiServer table
Go to SQL Management Studio and look for the dbo
Gadget | ||
---|---|---|
|
|
In this case, “BAS-PC” is my computer’s name, followed by the port (:8080) my MPBM app is listening to. This last part is not always necessary. Please check the following.
- You can check your computer name by opening command prompt (Windows key + R) and entering “sysdm.cpl”. Press Enter or click OK. You will now see a screen which shows the computer name, see image below.
- You can check the MPBM port by going to IIS. Click on the Windows sign in the lower left corner, type “IIS” and hit Enter. Open the Sites folder by clicking on the arrow in front of your username in the upper left corner. Now click on the arrow in front of the “Sites” folder, this will open up the Default Web Site. If everything is set up correctly, this is where the MPBMApi and MPBMApp are located as well. Please check this, and if they are indeed present select the Default Web Site by clicking on it once. Now, in the right menu of the screen, you can click on Bindings… (right below Edit Site). This will open the site’s bindings and it will show you the port your MPBM app is listening to. If it shows port 80 here, this means it is set to the standard port and you don’t have to configure it (so you just have to enter the computer name in the ApiServer table. See image below.
In my case it is set to 8080, so I will put :8080 behind my computer name in the ApiServer table. See image below.
Check #2: SQL Management Studio: ServerInfo table
Go to SQL Management Studio and connect to the instance that you just used to log in to MPBM. From there, navigate to the BudgetModule database (double click), Tables (double click), dbo._as_MPBM_ServerInfo (right click + Edit top 200 rows). You will find a table there in which you can add or change the connection strings. Information not / not correctly being displayed in the MPBM app is often caused by incorrect connection strings in the ServerInfo table. To make sure the databasename is correct, please copy the database name from SQL Management Studio (right click database, rename, control + C, go to connection string, control + V in the connections string). After editing the line in SQL Management Studio, press Enter to save the changes. The server name can be copied by reight clicking on the server name in SQL Management Studio, click connect, control + C, control + V in connection string. Please note that even an excessive space will cause this error. What follows now is a brief explanation of the columns in the ServerInfo table.
ID: Will be filled automatically when creating a new line
CreationDate: Simply enter the date in the following format and press enter. YYYY-MM-DD
LastUpdateDate: Simply enter the date in the following format and press enter. YYYY-MM-DD
Name: The name of the database. This name will be displayed in the list with servers in the server settings menu of the MPBM login screen. Preferably copy this name from the database name in SQL server.
Description: Preferably enter the same name as in the Name field
ConnectionString: Should always have the following format!
Server=ENTER SERVER NAME;Database=ENTER DATABASE NAME;User Id=SA; Password=ENTER SA PASSWORD FOR SQL;
You can leave the other columns blank (NULL), as we just set them up in the ConnectionString column.
You can add multiple databases by adding more lines to this table as described above. This may look something like the image below.
Check 3: inetpub folder on C drive: The Web.config file
The Web.config file is by default located on this file path:
C:\inetpub\wwwroot\MPBMApi
Copy this in the file explorer to go to the right folder directly. Look for a file with the name Web.config, right click on it, Open with, select Notepad. When this file is opened in Notepad, look for this particular part. The parts you need to check / edit are highlighted in red.
<connectionStrings>
<add name="WebApi" connectionString="Server=SQL INSTANCE NAME;Database=BudgetModule; User Id=SA; Password=SA PASSWORD" providerName="System.Data.SqlClient" />
<add name="ErrorStore" connectionString="Server=SQL INSTANCE NAME;Database=BudgetModule; User Id=SA; Password=SA PASSWORD" providerName="System.Data.SqlClient" />
<add name="ScoaConnection" connectionString="Server=SQL INSTANCE NAME;Database=SCOA; User Id=SA; Password=SA PASSWORD" providerName="System.Data.SqlClient" />
<add name="EvolutionModule" connectionString="Server=SQL INSTANCE NAME;Database=EvolutionModule; User Id=SA; Password=SA PASSWORD" providerName="System.Data.SqlClient" />
<add name="EvolutionCommon" connectionString="Server=SQL INSTANCE NAME;Database=EVOLUTION COMMON NAME; User Id=SA; Password=SA PASSWORD" providerName="System.Data.SqlClient" />
</connectionStrings>
Change the connection strings to match the SQL instance name, SA password or EvolutionCommon database name, hit save and go back to the MPBM app. Hit control + F5 and see if things are now correctly loading. This might take a while, so please be patient. If you are not allowed to save the changes in the Web.config notepad file, please do the following. Don’t save it directly to the folder, but save the file to the desktop. Then, drag the newly saved file from the desktop to the folder where the old Web.config file is located (C:\inetpub\wwwroot\MPBMApi). You will have the option to confirm the action as an administrator, so click yes, and it will replace the Web.config file. Again, go to the app, hit control + F5, and see if the changes are coming through.
Check 4: inetpub folder on C drive: The config.json file
The Web.config file is by default located on this file path:
C:\inetpub\wwwroot\MPBMApp\app\core\config
Open the file with notepad to see the contents. The string should have a format like the following. Check the parts in red, you may need to edit this. The rest should always stay exactly as per the example below.
[{"serverProviderAddress":"http://BAS-PC:8080/MPBMApi/api/server/0","serverProviderUrl":"http://BAS-PC:8080/MPBMApi/api/"}]
...
|
Gadget | ||||||||
---|---|---|---|---|---|---|---|---|
|
Gadget preferences spaceName=MPBM%20-%20CCG&spaceKey=MPBM&quickfind-space=MPBM%20-%20CCG&pageId=852471&pageName=Fix:%20Update%20the%20Web.config%20file&quickfind-page=Fix:%20Update%20the%20Web.config%20file&showLink=true&isConfigured=true&refresh=60&isEditable=false author Bas Damen width 1500 url rest/gadgets/1.0/g/com.atlassian.confluence.plugins.gadgets:confluence-page-gadget/gadgets/confluence-page-gadget.xml
Gadget preferences spaceName=MPBM%20-%20CCG&spaceKey=MPBM&quickfind-space=MPBM%20-%20CCG&pageId=852445&pageName=Fix:%20Update%20the%20Config.json%20file&quickfind-page=Fix:%20Update%20the%20Config.json%20file&showLink=true&isConfigured=true&refresh=60&isEditable=false author Bas Damen width 1500 url rest/gadgets/1.0/g/com.atlassian.confluence.plugins.gadgets:confluence-page-gadget/gadgets/confluence-page-gadget.xml
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...