A problem with HttpWebRequest in VS Express for C# - Visual Studio - Netduino Forums
   
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.
Photo

A problem with HttpWebRequest in VS Express for C#

HttpWebRequest VS Express Problem System.Net

Best Answer knut.tveitane, 07 June 2014 - 07:12 AM

In the micro framework, these classes are found in the assembly System.Http, so you need to add a reference to that one. The namespace is System.Net.

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 Yeison Mejia

Yeison Mejia

    New Member

  • Members
  • Pip
  • 2 posts

Posted 02 June 2014 - 06:04 PM

Hi,

I'm new in Netduino develop. In this moment I have a NetduinoPlus 2. I'm trying to consume a RESTFul WebService, so I need the HttpWebRequest (Like the example in the book Getting Starting With the Internet Of Things). The problem is that VS dosen't find HttpWebRequest and WebRequest.

VS said:"Error didn't find HttpWebRequest in the name space"

(Original Message): "Error    2    No se puede encontrar el tipo o el nombre de espacio de nombres 'HttpWebRequest' (¿falta una directiva using o una referencia de ensamblado?)    C:\Users\sonic\Documents\Visual Studio 2010\Projects\MaquinaNetduino\MaquinaNetduino\Program.cs    31    32    MaquinaNetduino"

I've tried to change de .Net Framework version from 4.2 to 4.1 and 4.0, but it didn't work. I apreciate any help.

Thanks.



#2 knut.tveitane

knut.tveitane

    Member

  • Members
  • PipPip
  • 18 posts

Posted 07 June 2014 - 07:12 AM   Best Answer

In the micro framework, these classes are found in the assembly System.Http, so you need to add a reference to that one. The namespace is System.Net.



#3 Yeison Mejia

Yeison Mejia

    New Member

  • Members
  • Pip
  • 2 posts

Posted 07 June 2014 - 02:56 PM

Thanks for your answer. I solved the problem the same day that I posted it here, but I couldn't find it to take out or mark it as solved. I got the solution from Microsoft's forums. I solved it by adding a reference to System.Http.dll.







Also tagged with one or more of these keywords: HttpWebRequest, VS Express, Problem, System.Net

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.