私は、ユーザーがイベントに参加して通知を受け取れるサービスを作成しています。私はnetTcpBindingでこれをやろうとしていますが、ローカルマシン上で実行していてもエラーが発生し続けます。net tcpを使用したWCFデュプレックスサービス: "ストリームセキュリティが必要です..."
私は通知を送信しようと、私は、タイムアウトこのエラーを取得しています:テスト用
Stream Security is required at http://www.w3.org/2005/08/addressing/anonymous , but no security context was negotiated. This is likely caused by the remote endpoint missing a StreamSecurityBindingElement from its binding.
私はコンソールでサービスをホストしています、そしてそれは私のために開いていると私は見ることができますWSDLを実行し、その上でsvcutilを実行します。クライアントを実行して通知を送信しようとすると、上記のエラーが表示されます。
ホストのApp.config:ここ
<system.serviceModel>
<services>
<service name="CompanyName.WebServices.InterventionService.RegistrationService"
behaviorConfiguration="RegistrationServiceBehavior">
<endpoint address="http://localhost:8000/CompanyName/Registration"
binding="wsDualHttpBinding"
contract="CompanyName.WebServices.InterventionService.Interfaces.IRegistrationService"/>
<endpoint address="net.tcp://localhost:8001/CompanyName/Registration"
binding="netTcpBinding"
contract="CompanyName.WebServices.InterventionService.Interfaces.IRegistrationService"/>
</service>
<service name="CompanyName.WebServices.InterventionService.NotificationService"
behaviorConfiguration="NotificationServiceBehavior">
<endpoint address="http://localhost:8010/CompanyName/Notification"
binding="wsDualHttpBinding"
contract="CompanyName.WebServices.InterventionService.Interfaces.INotificationService"/>
<endpoint address="net.tcp://localhost:8011/CompanyName/Notification"
binding="netTcpBinding"
contract="CompanyName.WebServices.InterventionService.Interfaces.INotificationService"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="RegistrationServiceBehavior">
<serviceMetadata httpGetEnabled="true"
httpGetUrl="http://localhost:8000/CompanyName/Registration"/>
</behavior>
<behavior name="NotificationServiceBehavior">
<serviceMetadata httpGetEnabled="true"
httpGetUrl="http://localhost:8010/CompanyName/Notification"/>
</behavior>
<behavior name="netTcpRegistrationServiceBehavior">
<serviceMetadata httpGetEnabled="true"
httpGetUrl="net.tcp://localhost:8001/CompanyName/Registration"/>
</behavior>
<behavior name="netTcpNotificationServiceBehavior">
<serviceMetadata httpGetEnabled="true"
httpGetUrl="net.tcp://localhost:8011/CompanyName/Notification"/>
</behavior>
</serviceBehaviors>
</behaviors>
クライアントはApp.configファイルです:
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_IRegistrationService">
<security mode="None">
<message clientCredentialType="None"/>
<transport clientCredentialType="None"/>
</security>
</binding>
<binding name="NetTcpBinding_INotificationService">
<security mode="None">
<message clientCredentialType="None"/>
<transport clientCredentialType="None"/>
</security>
</binding>
</netTcpBinding>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_IRegistrationService">
<reliableSession ordered="true"/>
<security mode="None">
<message clientCredentialType="None" negotiateServiceCredential="false"/>
</security>
</binding>
<binding name="WSDualHttpBinding_INotificationService">
<reliableSession ordered="true"/>
<security mode="None">
<message clientCredentialType="None" negotiateServiceCredential="false"/>
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8000/GPS/Registration"
binding="wsDualHttpBinding"
bindingConfiguration="WSDualHttpBinding_IRegistrationService"
contract="IRegistrationService"
name="WSDualHttpBinding_IRegistrationService">
</endpoint>
<endpoint address="net.tcp://localhost:8001/GPS/Registration"
binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IRegistrationService"
contract="IRegistrationService"
name="NetTcpBinding_IRegistrationService">
</endpoint>
<endpoint address="http://localhost:8010/GPS/Notification"
binding="wsDualHttpBinding"
bindingConfiguration="WSDualHttpBinding_INotificationService"
contract="INotificationService"
name="WSDualHttpBinding_INotificationService">
</endpoint>
<endpoint address="net.tcp://localhost:8011/GPS/Notification"
binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_INotificationService"
contract="INotificationService"
name="NetTcpBinding_INotificationService">
</endpoint>
</client>
私は以来、登録コードの多くを省略しました私はただちに通知を受けようとしています。
これは、顧客のドメインに属していない2003サーバーのWindowsサービス(セットアップ)でホストする予定であり、クライアントコンピュータは顧客のドメインになります。
編集:私は、ホストのApp.configファイルにバインディングを追加した
:同じスチームセキュリティが強化された
これはまだエラーは、必要とされるエラーメッセージ。このソリューションの小さなサブセットを新しいソリューションで試してみましょう。
素晴らしい!私はVSの発見がこれを正しかったと思ったが、それでも設定を編集しなければならなかった。ありがとう! – rozon