Click here to Skip to main content
15,921,467 members

Comments by WheatleyJJ (Top 1 by date)

WheatleyJJ 10-Feb-17 4:19am View    
You probably won't need this, as its 7 years on..

You're setting your proxy settings after making the network call. You want to create the proxy settings and assign them before calling DoStuff();

Like so:
try
{
myWebService ws = new myWebService;
IWebProxy proxy = HttpWebRequest.DefaultWebProxy;
proxy.Credentials = CredentialCache.DefaultCredentials;
ws.Proxy = proxy;
DoStuff res = ws.DoStuff();
}
catch (Exception ex)
{
//log error
AppFunctions.Errors err = new AppFunctions.Errors();
err.logError(ex.Message.ToString());
}