>No time to look properly just now but haven't you got the process the wrong way round (i.e. the Write() param should be Convert.ToBase64String(System.Text.Encoding.Default.GetBytes......etc not GetString()....
It cannot be done in that order. If you try your code, you will see that it will generate an error.