Search code examples
c#.netenterprise-library

Enterprise library logging + dynamic connection string


I am using the enterprise library logging and exception handling.
Currently I am adding the connection string in the configuration file, and this means that it is static.
My problem is that the user may connect to a different database each time depending on his user name. Is there any way to change the connection string at run time?


Solution

  • I created a CustomTraceListener