ConvertBase64. Where is it in 4.3?

One of the frustrating things with the NETMF SDK’s is the fact that references get changed so when you find some code you want to check out and use, you find that it won’t build. :frowning:

The SMTP file in codeshare is one example. It was originally built for 4.1 and so when I load it into 4.3 the ConvertBase64 function is highlighted as unknown. Doing a search on the net I can’t find this.

Damn, I do this every time. I post then find something :slight_smile:

I think this is the same.


Do note that the netmf version is not compliant with RFC 4648, which matters if you are going to use it with anything other than another netmf system (for instance, when sending keys to Azure). Other systems will appear to randomly fail to convert the string you send.

To create an RFC 4648 compliant string, you need to change ‘!’ to ‘+’ and ‘*’ to ‘/’.

I think there may also be a global flag setting that will change the conversion under the covers.


Ah ok, thanks for the heads up. Looks like I need to look into this a little more as I am pretty sure my email server requires encryption on the username and password during authentication. :frowning:

I found this:

Convert.UseRFC4648Encoding which seems to be what you are talking about.

I’ll give it a try.


@ Dave McLaughlin - that is the setting you are looking for.
There is an open issue in .NETMF GitHub for this: