如何在wcf 4.0中应用没有证书的安全性 [英] How to apply the security without certificate in wcf 4.0

查看:65
本文介绍了如何在wcf 4.0中应用没有证书的安全性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,我是第一次在wcf上做,我创建了方法并使用wshttpbinding设置了Endpoint,并且需要在wcf中应用安全性。因为在该安全模式下使用wshttpbinding是消息而clientcredentialtype是用户名



创建一个自定义类并从customusernamepasswordValidator继承了这些方法。在将请求发送到方法之前,我们正在使用用户名和密码进行验证。


web.config文件中的
我设置了customValidation详细信息。并托管在IIS中。调试完服务后,得到以下错误





未提供服务证书。在ServiceCredentials中指定服务证书。





在我的要求中,不要使用任何证书,如自我或其他ssl.But服务应该更安全。我们正在使用自定义类,我从clinet发送用户名和密码,然后在转到wcf服务中的相关方法之前,我们可以使用自定义验证类进行身份验证。我在绑定中使用BasicHttpBinding和nettcpbinding进行了检查,但是这两个并没有在wcf中触发我的方法。请帮助我。 .....

Hi friends, I am first time doing on wcf, I create the method and setting the Endpoint with wshttpbinding and need to apply the security in wcf. for that using the wshttpbinding within that security mode is Message and clientcredentialtype is Username and

create one custom class and inherits the methos from customusernamepasswordValidator. Beacause before going the the request to method, we are validating with the username and password.

in web.config file i set the customValidation details. and hosted in IIS. After debugging the service then got the below erro


The service certificate is not provided. Specify a service certificate in ServiceCredentials.


In my requirement don't use any certificate like self or other ssl.But service should be more secure. we are using custom class and i send the username and password from clinet then before going to the pertinent method in wcf service we can do the authentication using Custom validition class. i was checked using BasicHttpBinding and nettcpbinding in binding but these two doen't fire the my method in wcf. pls help me......

推荐答案

您可以生成然后使用自签名SSL证书。这是链接 [ ^ ]
You could generate then use self signed SSL Certificates. Here is a link[^]


http://stackoverflow.com/questions/6584794/wcf-security-username-password-without-certificate [ ^ ]



WCF服务中的身份验证和授权 - 第1部分 [ ^ ]

WCF服务中的身份验证和授权 - 第2部分 [ ^ ]



或者更确切地说使用SSL,

< a href =http://msdn.microsoft.com/en-us/library/hh556232(v=vs.110).aspx> LINK 1 [ ^ ]

LINK 2 [ ^ ]



-KR
http://stackoverflow.com/questions/6584794/wcf-security-username-password-without-certificate[^]

Authentication and Authorization in WCF Services - Part 1[^]
Authentication and Authorization in WCF Services - Part 2[^]

Or rather using SSL,
LINK 1[^]
LINK 2[^]

-KR


这篇关于如何在wcf 4.0中应用没有证书的安全性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆