c# - The type or namespace name 'Http' does not exist in the namespace 'System.Net' -


i developing handset application in .net framework 3.5,which using api service call check email address website.i using below code perform that,

using system.net.http;  httpclient webclient = new httpclient(); webclient.querystring.add("email", email); stream stream = webclient.openread(brandendpoint); 

initially used webclient instead of httpclient , got error "the type or namespace name 'webclient' not found" google , fixed httpclient.

after replacing webclient httpclient getting error "the type or namespace name 'http' not exist in namespace 'system.net".

need solve this.

thanks

httpclient available in .net 4.5 or 4.0 microsoft.net.http nuget package. isn't @ available .net 3.5.

httpclient uses features tpl available in .net 4+.

you'll have use either system.net.webclient or webrequest. if compilation errors, make sure you've added proper using statements. these 2 classes available since .net 1.1, in system.dll library , available.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -