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:
Post a Comment