Calling web service from .NET Core 2.2 application RRS feed

  • Question

  •  In the .NET Core 2.2 when i am behind proxy in my work environment it fails.. but no proxy calling from open home network it works. 

    I am not be able to make web service calls, which requires proxy credentials.
    Proxy throws 407 error always as .NET Core 2.2 has no mechanism to send proxy credentials while making web service calls. 

    its is fixed in NET Core 3.0, but that is not needed. since our application is still running in .net core 2.0

     please let me know if you have any way forward or workaround with .NET Core 2.2 

    Note: I am using WCF factory converted from svcutil.exe using wsdl  asmx url. using ChannelFactory and BasicHttpBinding method

    Sunday, April 26, 2020 1:03 PM

All replies

  • Hi,
    Theoretically speaking, as long as the client proxy can be generated correctly by the Microsoft WCF WEB Service Provider, the client could make a successful call. proxy credentials could set up by the proxy method.
    ServiceReference1.ServiceClient client = new ServiceClient();
                client.ClientCredentials.UserName.UserName = "administrator";

    The actual credential type relies on the binding type located on the server-side. 
    Please refer to the below links.
    I would like to know that the client proxy settings which are generated automatically in the Reference.cs
    Feel free to let me know if there is anything I can help with.
    Best Regards
    Abraham Qian
    Tuesday, April 28, 2020 8:42 AM