Received error during call HTTPS wsdl RRS feed

  • Question

  • User-665585339 posted

    Hi i invoke client wsdl file and via HTTPS called, but received following error:-

    #The HTTP request was forbidden with client authentication scheme 'Anonymous'.#

    Any ideas?

    Monday, February 10, 2014 5:53 AM


All replies

  • User-265225665 posted

    You havent posted any code, so it will be quite difficult to find cause of error, but this error comes due to invalid user, means the file which you are requested needs authentication. 

    If you are requesting third party wsdl than you need to go thorugh the documentation, they might have provided the way to request the resource.

    Monday, February 10, 2014 8:16 AM
  • User-665585339 posted


    My certificate path -> C:\MyCert\cert.cer

    My code ->

    ServiceClient service = new ServiceClient();

      ServicePointManager.ServerCertificateValidationCallback = delegate
                    { return true; };

                    FileStream fs = File.Open("C:\\MyCert\\cert.cer", FileMode.Open, FileAccess.Read);
                    byte[] buffer = new byte[fs.Length];
                    int count = fs.Read(buffer, 0, buffer.Length);
                    X509Certificate2 cert = new X509Certificate2(buffer);
                    service.ClientCredentials.ClientCertificate.Certificate = cert;

                   //Call the service


    Tuesday, February 11, 2014 12:57 AM
  • User-417640953 posted

    Hi johnlim35,

    Thank you post the issue.

    The HTTP request was forbidden with client authentication scheme 'Anonymous'

    That error message means the server side authenticated the client failed. Below are similar issues.


    From you code provided, I see the service has a transport certificate security model. And you should provide the x509certification.

    If you call the third part service, you should contact the server admin for the help.

    If the service is your own project, please refer to below article for How to: Use Certificate Authentication and Transport Security in WCF Calling from Windows Forms.



    Hope this helps, thanks.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 13, 2014 2:40 AM