Mil*_*len 12 wcf soapui wcf-security
我正在尝试配置我的WCF(.NET 4.0)服务,以便可以使用soapUI进行测试.我正在使用带有消息安全性的wsHttpBinding.我的目标是在公共测试端点上公开服务,并尝试使用使用soapUI测试的loadUI对其进行加载测试.为了实现这一点,端点需要是安全的,因为我的生产端点将使用消息安全性,我认为我的测试也应该使用它来实现接近生产负载测试结果.
我似乎无法配置soapUI来成功调用该服务.我尝试了许多使用客户端和服务器证书对输入和输出进行签名和加密的组合.有没有人设法成功实现WCF和soapUI的消息安全配置?
以下是我配置的摘录:
捆绑:
<wsHttpBinding>
<binding name="MessageSecurity">
<security mode="Message">
<message clientCredentialType="Certificate" negotiateServiceCredential="false"/>
</security>
</binding>
</wsHttpBinding>
Run Code Online (Sandbox Code Playgroud)
行为
<behaviors>
<serviceBehaviors>
<behavior name="customBehavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True"/>
<serviceCredentials>
<clientCertificate>
<authentication certificateValidationMode="PeerTrust"/>
</clientCertificate>
<serviceCertificate findValue="MyWebServicesCertificate" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="webHttp">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
Run Code Online (Sandbox Code Playgroud)
服务:
<service behaviorConfiguration="customBehavior" name="MyService">
<!-- Service Endpoint -->
<endpoint name="Production" address="" binding="wsHttpBinding" bindingConfiguration="MessageSecurity" contract="IMyService">
<identity>
<dns value="web_services_svr"/>
</identity>
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://web_services_svr/MyService.svc" />
</baseAddresses>
</host>
</service>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
15053 次 |
最近记录: |