Netduino home hardware projects downloads community

Jump to content

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


Member Since 10 Dec 2012
Offline Last Active Jul 02 2020 12:35 PM

Topics I've Started

Error(?) using WebRequest

01 January 2014 - 08:48 AM

Hello all,


I am trying to do a WebRequest from my Netduino to poll a string from another system. I am using the code below to perform the request:

 public double GetTemperature(string address)        {            var request = WebRequest.Create(_url);            var response = request.GetResponse();            request.Dispose();            var sr = new StreamReader(response.GetResponseStream());            var source = sr.ReadToEnd();            response.Dispose();            sr.Dispose();            ...        }

Problem is my code gets stuck at "GetResponseStream()".


Response headers:

Response: HTTP/1.1 200 OK
Connection: close
Cache-Control: no-cache
Response body:
When I look at the content length in debug it has a value of -1 although I actually get a response body.
My guess is that there is something missing in the headers that makes my code break.


Any ideas how to make this work?


BR Larre

Get parts of xml stream from web

15 October 2013 - 07:47 PM

Hi fellow Netduiners,


I am stuck in my project.


I have a onewire server called OW-SERVER-ENETthat produces an xml file of all my connected onewire devices and their value.

My goal is to read the xml file and get values from some of these devices and handle it in my Netduino.


However when running a WebRequest I only get part of the page. My guess is that I am getting too much data back for the Netduino to handle.


Can someone put me in the right direction of how to handle this? Is it possible to get certain parts back from a WebRequest?


Anyone else familiar with OW Server or OneWire?


BR Larre

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.