question

30466488 avatar image
0 Votes"
30466488 asked TimonYang-MSFT commented

Microsoft Practices Enterprise Library Logging with AWS Secret Manager

Hi,

My application uses Microsoft Practices Enterprise Library for logging exception in database. This is configured to take the connection string from the web.config file.

Now, we are supposed to read all the connection string information from AWS Secret Manager.

How should we change the enterprise library to look from connection string at a different place instead of web.config file.

Please help.

dotnet-csharp
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@30466488
If you mean you want to access AWS Secret Manager through c# to get the information stored in it, then I suggest you go to the forum provided by the developer of this product to ask your questions.
Forum: AWS Secrets Manager
If access via c# is allowed, they should provide detailed technical documentation.

0 Votes 0 ·

@TimonYang-MSFT, thank you so much for responding.

No, I am not looking how to access AWS Secret Manager from c#, rather I am trying to find a way to have Enterprise Library Logging class to let me change the connection string dynamically so I can override the connection string that it takes from web.config.

I am able to get the connection string info from the Secret Manager through C#, but not able to find a way to use it in the method Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write.

Is there any way, we can force the EnterpriseLibrary.Logging.Logger.Write to use the connection string that we want dynamically, instead of one from web.config.

Please help.

0 Votes 0 ·

@30466488
According to the documentation, this package has been outdated for many years.
Microsoft.Practices.EnterpriseLibrary.Logging Namespace
You can show a piece of code to get the connection string located in web.config, maybe some members can make some modifications on this basis to achieve your needs (if this operation is allowed),
But a better suggestion might be to replace this package with a more modern package to meet your needs.

0 Votes 0 ·

0 Answers