Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm building an Portable Class Library project. I seem not support WebProxy ( I'm preferenced the System.Net, i added Using System.Net )
C#
cookieContainer = new CookieContainer();
handler = new HttpClientHandler
{
CookieContainer = cookieContainer,
UseCookies = true,
UseDefaultCredentials = false,
UseProxy = true,
Proxy = new WebProxy("http://127.0.0.1:8888"), // It raised the error here: Error 1 The type or namespace name 'WebProxy' could not be found (are you missing a using directive or an assembly reference?)
}; 

How to slove this ?
Posted
Updated 23-Feb-14 7:05am
v3
Comments
Thomas Daniels 23-Feb-14 12:35pm    
Have you added using System.Net; at the top of your code file?
tieugiang94 23-Feb-14 13:04pm    
Yes. I Have
ZurdoDev 23-Feb-14 20:05pm    
There should be a smart tooltip that shows you the issue.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900