.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Need to set Proxy for WCF-Client

Posted By: Sadhuryan     Posted Date: November 13, 2010    Points:2   Category :C#
I Need to consume an WCF Service from a C# Windows Application thru proxy. Can anyone tell me, how to do the same..?

Author: SureshM             
Posted Date: November 24, 2010     Points: 5   

using System.Net;

WebProxy proxyObject = new WebProxy("your system IP", "port number"); //ex:("",8080)
NetworkCredential objcred = new NetworkCredential("Login Name", "Password");//
proxyObject.BypassProxyOnLocal = true;// Disable proxy use when the host is local.
proxyObject.Credentials = objcred;
GlobalProxySelection.Select = proxyObject;

//You can put the code in page_load or else where.

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend