WebConfig..::..GetConnectionString Method
Gets a connection string from the connectionStrings node in config. Note that this method reads
from the configuration section, not the appSettings one.
Namespace:
CoreAssembly: Core (in Core.dll)
Syntax
Parameters
- keyName
- Type: String
The name of the key, as specified in application config.
Return Value
A connection string from the config file.Exceptions
Exception | Condition |
---|---|
ConfigurationErrorsException | No connection string section was found or no entry present with specified key. |