Sending SOAP messages WCF client that include a username token and digital signature but are NOT encrypted

可紊 提交于 2019-12-07 14:24:47

问题


WCF does my head in. What I'm trying to do is create a WCF client that will send SOAP messages that contain a username token and are signed with a certificate, but are not encrypted. I've found many articles and blogs with code which almost does what I want, but not quite, and now I'm stumped. Can anyone give me a simple example of how to do this?

What I've done so far is:

  • Use svcutil to generate a config file and WCF code from a wsdl and xsd
  • Install certificates and load from the certificate store

I've tried many different things and had many different errors and would like a an example which is as simple as possible so I can a) have some chance of understanding it and b) figure out what I need to change to make the code work.


回答1:


Just a guess, but you could try TransportCredentialOnly. I had trouble last year trying to call a SOAP service with using a WCF client with basic authentication over http and couldn't get it to work. I found a few articles on line but couldn't get any to work.



来源:https://stackoverflow.com/questions/7026743/sending-soap-messages-wcf-client-that-include-a-username-token-and-digital-signa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!