Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

dbelcham's Content

There have been 2 items by dbelcham (Search limited from 27-April 23)


By content type

See this member's

Sort by                Order  

#63882 SSL Authentication issues

Posted by dbelcham on 14 August 2015 - 07:08 PM in Netduino 3

The exception thrown is "SystemException" and there is no error code that I'm able to find. I'll take care of updating the firmware later today and post back those results.

 

20388319349_afddac2b84_z.jpg




#63874 SSL Authentication issues

Posted by dbelcham on 13 August 2015 - 03:58 PM in Netduino 3

When I'm running my Netduino 3 WiFi I get the following error trying to connect to an Azure Mobile Services endpoint to do a POST

Microsoft.SPOT.Net.Security.SslStream::Authenticate
Microsoft.SPOT.Net.Security.SslStream::AuthenticateAsClient
System.Net.HttpWebRequest::EstablishConnection
System.Net.HttpWebRequest::SubmitRequest
System.Net.HttpWebRequest::GetRequestStream
Igloocoder.MF.AzureMobileServices.MobileServiceEndpoint::Insert
Igloocoder.BbqDuino.Program::TakeTemperatureReading

The code being executed is as follows:

        public HttpWebResponse Insert(string table, string json)
        {
            var request = (HttpWebRequest) WebRequest.Create("https://myazuremobileservice.azure-mobile.net/tables/" + table);
            request.Method = "POST";
            request.Accept = "application / json";
            request.ContentType = "application / json; charset = UTF-8 ";
            request.ContentLength = json.ToCharArray().Length;
            request.Headers.Add("X-ZUMO-APPLICATION", "myApplicationKey");

            using (var streamWriter = new StreamWriter(request.GetRequestStream()))
            {
                streamWriter.Write(json);
                streamWriter.Flush();
                streamWriter.Close();
            }

            using (var response = (HttpWebResponse) request.GetResponse())
            {
                return response;
            }
        }

The exception is being thrown on the line with "using (var streamWriter" at the start of it. The only thing available is the stack trace at the start of this post. There is no inner exception and the message is "Exception was thrown: System.Exception"

 

I did some research and found a few posts on this forum but none of them seem to have any confirmed fixes. The closest I got was to use MFDeploy and do "Target | Manage Device Keys | Update SSL Seed" which outputs the following

Updating SSL seed...
request configured
Update Complete!

Any guidance, ideas or general thoughts would be appreciated.





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.