wcf - Exception during secure communication implementation -


im trying implement simple secured client server communiction using wcf. when im launching mt server everty thing ok , when im launching client im getting error: error : error occurred while making http request https://localhost:800 0/exchangeservice. due fact server certificate not configured http.sys in https case. caus ed mismatch of security binding between client , server.

this server code :

        uri address    = new uri("https://localhost:8000/exchangeservice");          wshttpbinding binding = new wshttpbinding();          //set binding params         binding.security.mode = securitymode.transport;         binding.security.transport.clientcredentialtype =     httpclientcredentialtype.none;         binding.security.transport.proxycredentialtype = httpproxycredentialtype.none;           type        contract = typeof(exchangeservice.servicecontract.itradeservice);         servicehost host = new servicehost(typeof(tradeservice));            host.addserviceendpoint(contract, binding, address);         host.open();    

this client configuration (app.config):

</client> <bindings>   <wshttpbinding>     <binding name="tradewshttpbinding">       <security mode="transport">         <transport clientcredentialtype="none"                    proxycredentialtype ="none"/>       </security>      </binding>   </wshttpbinding> </bindings> 

the security configuration @ both client , server same , and dont need certificate server in kind of security (transport) why exception ????

thanks...

well looking @ code:

uri address    = new uri("https://localhost:8000/exchangeservice"); 

you're specifying address using ssl (https) require certificate purpose. either use http binding or install certificate.

i'd check out application scenarios , how tos section on codeplex link different configurations , details of how configure them.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -