Calling a SOAP v1.1 service with WCF


writing first program data soap v1.1 service using https. calling method uses user name/password authentication retrieve token. get:

"an error occurred while making http request [service url]. due fact server certificate not configured http.sys in https case. caused mismatch of security binding between client , server."

the code have is:

            endpointaddress epa = new endpointaddress(@"https:// .. url ..");

            basichttpbinding bind = new basichttpbinding();
            bind.security.message.clientcredentialtype = basichttpmessagecredentialtype.username;
            bind.security.transport.clientcredentialtype = httpclientcredentialtype.basic;
            bind.security.transport.proxycredentialtype = httpproxycredentialtype.basic;
            bind.security.mode = basichttpsecuritymode.transportwithmessagecredential;

// dpsauthenticationsoapclient proxy generated wsdl
            dpsauthenticationsoapclient dpsclient =
                new dpsauthenticationsoapclient(bind, epa);

            dpsclient.clientcredentials.username.username = "(username)";
            dpsclient.clientcredentials.username.password = "(password)";

            string token = dpsclient.dpsrequesttoken(1, "(our identifier)");

this throws above exception. i'm missing basic, can't find what.

thanks

2 things. first of all, this due fact server certificate not configured http.sys in https case. caused mismatch of security binding between client , server.

second of all, there wcf forum at http://forums.microsoft.com/msdn/showforum.aspx?forumid=118&siteid=1. you'll more on wcf issues on there.

john saunders | use file->new project create web service projects


Archived Forums A-B  >  ASMX Web Services and XML Serialization



Comments

Popular posts from this blog

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

Azure DocumentDB Owner resource does not exist

SQL Server 2008 - High Memory Usage