Wanting the love, but feeling the pain

So, just to recap, I’ve just embarked on my Gadgeteer journey (with a Spider), and decide to opt with Beta NETMF 4.2 as the starting point. First hiccup for me was the VS Designer, then my Wifi module (but that’s ok, resorted to the J11D), now… in talking to Azure and going through authentication and needing SSL (E_CLR_NOT_SUPPORTED)… I think I’ve come to a crossroads… Do I go back and start with NETMF 4.1 on my Spider, or sit it out for 4.2. Is it days or weeks away ? All advice gratefully received.

Many thanks.

WiFi is exactly what we are doing now. I think it wouldn’t be more than 2 weeks.

But, the SDK you installed include 4.1 so you can use it now without re-installing anything, just update (downgrade) to 4.1

@ Gus, thanks… I’m now up/down graded… Am attempting a HTTP POST to an SSL URI and getting this exception in 4.1 (same error/point as 4.2):

Step into: Stepping over non-user code 'System.Net.Sockets.NetworkStream.NetworkStream' Step into: Stepping over non-user code 'Microsoft.SPOT.Net.Security.SslStream.SslStream' Step into: Stepping over non-user code 'System.Net.HttpWebRequest.EstablishConnection' Step into: Stepping over non-user code 'System.Uri.Host.get' Step into: Stepping over non-user code 'System.Net.HttpWebRequest.EstablishConnection' Step into: Stepping over non-user code 'Microsoft.SPOT.Net.Security.SslStream.AuthenticateAsClient' Step into: Stepping over non-user code 'Microsoft.SPOT.Net.Security.SslStream.Authenticate' #### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (3) ####

This is basically to the Bing Translation service at [b]https://datamarket.accesscontrol.windows.net/v2/OAuth2-13[/b]

Any thoughts ?

Dave, sounds like your trying to use a method that is not supported by NETMF. VS will catch most of that sort of thing at compile time but I have seen a few things that are valid in the full .NET but not in NETMF sneak through the compile process and fail at run time. Maybe posting your code (a simple example that shows the problem) would help.

@ Jeff

The code is available here: Browse code samples | Microsoft Learn
The code fragment looks like this:


        private AdmAccessToken HttpPost(string DatamarketAccessUri, string requestDetails)
        {
            //Prepare OAuth request 
            WebRequest webRequest = WebRequest.Create(DatamarketAccessUri);
            webRequest.ContentType = "application/x-www-form-urlencoded";
            webRequest.Method = "POST";
            byte[] bytes = Encoding.UTF8.GetBytes(requestDetails);
            webRequest.ContentLength = bytes.Length;
            using (Stream outputStream = webRequest.GetRequestStream())
                outputStream.Write(bytes, 0, bytes.Length);

It fails inside the GetRequestStream (). I’ve changed nothing, although I’m using my own Client credentials. There’s also a .NET Framework version which works fine, so that sort of demonstrates my credentials are ok. I can PM you my credentials if you want to have a go…

From the release notes for the current premium 4.2 library

@ everyone, stand down…

Read a Gus note on another thread that said “Have you set a encryption seed with MFDeploy”. Nope, I hadn’t. I have now, and we’re all good on the SSL code… I get some response back from Bing now… although it’s not playing on the music module yet… nearly there…