Monday, February 23, 2026

 app.config


To hide tokens passwords etc

In your vb.net project open app.config
Add following lines
  <appSettings file="secret.config">
    <add key="AppName" value="MyApp" />
</appSettings>

Next create a secret.config file in same folder as app.config.
Add the file to the project and set properties 'Copy if newer'

Add following to it to secret.config:

<appSettings>
    <add key="dbUser" value="DbUserNameHere" />
<add key="dbPwd" value="TopSecret" />
</appSettings>


Now in your code:

dim dbUser as string=ConfigurationManager.AppSettings("dbUsER") 

Next exclude secret.config to be uploaded to your repository.
gitIgnore

No comments:

MySQL to MariaDB

 Here is a good description how to migrate to MariaDb MySQL to MariaDb Example of how to dump data from MySQL port=3307: mysqldump --user=ro...