"Bad Request" error while consuming REST WCF Service RRS feed

  • Question

  • Hi,

    I do have a POST method in my REST Service. Also, i have enabled Certificate Authentication for the POST Method.

    This is my Service,

        public interface IMailingService
            [WebInvoke(UriTemplate = "Sample", Method = "POST", RequestFormat = WebMessageFormat.Xml)]
            bool Sample(Message message);

    Message is a complex type.

    My web.config has settings like below,

                  <certificate findValue="somethumbprint" x509FindType="FindByThumbprint" storeLocation="LocalMachine" storeName="My" />
     <security mode="Transport">
                <transport clientCredentialType="Certificate"/>
          <access sslFlags="Ssl, SslNegotiateCert, SslRequireCert" />

    I have hosted my service in Azure. 

    Using HttpWebRequest object im consuming this service. i do pass the certificate in the request object. but, always im getting "Bad request".

    i have considered these points like,

    -My XML input namespaces are same.

    -My certificates are installed in Azure VM.

    -Im passing certificate from client side.

    -i have executed the cmd to unlock the azure VM's IIS  settings for SSL require.

    Could you please help me out ?

    Note: This code works very well without authentication.

    • Edited by PappiG Monday, December 17, 2012 11:42 AM
    • Changed type PappiG Monday, December 17, 2012 11:43 AM
    Monday, December 17, 2012 11:41 AM


  • PappiG --
    I believe you have erroneously posted your question in a public user forum dedicated to questions about Microsoft Project, a project management tool.  I would recommend you repost your question in a forum dedicated to software development questions.  Hope this helps.

    Dale A. Howard [MVP]
    VP of Educational Services
    "We write the books on Project Server"

    Monday, December 17, 2012 1:30 PM

All replies