Regarding this sample: https://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider(v=vs.110).aspx
Where in this sample is the public key used to encrypt the data?
Is it inside the RSAParameters object?
If yes what is the correct byte array to base64encode it and put the string into a web.config to re-use the public key when I have to decrypt the formerly encrypted data?
if you read the article you provided the link to then you will see the example says
//Export the key information to an RSAParameters object.
//Pass false to export the public key information or pass
//true to export public and private key information.
RSAParameters RSAParams = RSA.ExportParameters(false);
not sure how well you understand Public Key encyption but you use the public key to encrypt data and the private key to decrypt it so you need to ensure that the private key is stored securely, config files are not secure
you can read about the parameters here https://msdn.microsoft.com/en-gb/library/system.security.cryptography.rsaparameters%28v=vs.110%29.aspx