How do you configure data connection strings at the machine.config level?
Essentials 4.6.3 HTML5 2.7.2
I have successfully set my connection strings in the web.config files for Essentials and Workflow Designer.
However, Malcolm mentioned that if I were brave enough, there is a way to configure them at the machine level. Since the web.configs inherit from the machine level web.config, I was wondering where that file is located? Is it the Web.Config file in the GVH folder? There is no <connectionstrings> tag there now.
I have eight Geocortex instances over six machines, so it would be very dsirable to have only six files to configure versus twenty-four.
I was also curious why I put the configuration in the \REST\Manager web.config since the DataLinks in Essentials and the DataConnections don't seem to recognize those entries.
If anyone knows anything about how to get these connection strings configured at the machine level, we'd love to try it out.
0
-
Hi Sean,
Connection Strings can be set at any level within the web site. Adding a web.config file to any folder will configure IIS to add a connection string for that folder and every folder beneath it.
So, putting a <connectionStrings> tag in the web.config for the viewer would work for the viewer application but since Essentials and Manager aren't contained within that folder, it won't work for Essentials.
For Essentials, you may specify database connection strings in:- The Essentials REST and Manager web.config file
- Any web.config file in the path /Geocortex/Essentials/InstanceName/REST
- The system global web.config file, or
- The system global machine.config file.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
There is already a global connection string in the machine.config, "LocalSqlServer". The global web.config doesn't have any connection strings element, but you can add one if you like.
To check whether or not the connection string is available, use the Connection Strings applet in IIS manager to see what you have. They will either show as "local" or "inherited".
To check where they are defined, you can use the Configuration Editor applet, which lets you choose the connectionStrings section and will show you what part of the configuration tree defines the entry.
Note that, as with all other elements that use a collection, and <add> tags, that anyone may <remove> an entry at any point. This doesn't happen all that often, but it can, and the computer will obey those directives.
Regards,
-Malcolm0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar