Web Service through proxy server RRS feed

  • Question

  • The Proxy setting on ASP.NET 2.0 Web Services (with WSE3.0) seems not to work. I have used the partial class functionality to set the proxy server during construction of the web service proxy class in the client:
    partial class gdUserWse
        public gdUserWse(bool useProxy) : this()
            if (useProxy)
                string proxyUrl = Config.ProxyServer;
                System.Net.WebProxy proxy = new System.Net.WebProxy(proxyUrl);
                this.Proxy = proxy;

    This code runs when I invoke the service thus:
      gdUserWse gdu = new gdUserWse(true);
      ds = gdu.MyMethod(xxx);

    but the proxy setting appears to be totally ignored (I'm using a local tcp tracer proxy for testing).

    I succefully used a similar approach .net 1.1. Is the problem due to the WSE extensions? How can I fix it?

    brian smith

    Tuesday, June 6, 2006 1:53 PM