私はWCFサービスを持っています。ここでWCFサービスリファレンスは、DuplexBindingのため空のreference.csを生成します
<service behaviorConfiguration="Default" name="Breeze.AppServer.Emergencies.EmergencyRegistrator">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="EmergencyRegistratorBinding"
contract="Services.IEmergencyRegistrator" />
</service>
すべてがうまく働い設定
<basicHttpBinding>
<binding name="EmergencyRegistratorBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
とサービスの構成です。しかし、basicHttpBingindをDuplexBindingに変更する必要がありました。 私は拡張子を追加しました:
<extensions>
<bindingElementExtensions>
<add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexElement, System.ServiceModel.PollingDuplex"/>
</bindingElementExtensions>
</extensions>
とにライン上記の変更:
<customBinding>
<binding name="DuplexmergencyRegistratorBinding">
<binaryMessageEncoding/>
<pollingDuplex maxPendingSessions="2147483647" maxPendingMessagesPerSession="2147483647" inactivityTimeout="02:00:00" serverPollTimeout="00:05:00"/>
<httpTransport authenticationScheme="Negotiate"/>
</binding>
</customBinding>
と
<service behaviorConfiguration="Default" name="Breeze.AppServer.Emergencies.EmergencyRegistrator">
<endpoint address="" binding="customBinding" bindingConfiguration="DuplexmergencyRegistratorBinding" contract="Breeze.Core.Services.IEmergencyRegistrator" />
<endpoint address="mex" binding="customBinding" bindingConfiguration="DuplexmergencyRegistratorBinding" contract="IMetadataExchange"/>
</service>
私はWCFプロジェクトにサービス参照を追加しました。参照は正常に追加されましたが、Reference.csはほとんど空でした。代わりの
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
私は コードが生成され、「参照されるアセンブリに
リユースタイプ」オプションをオフが、そこに上記の10何千行〜500
私はsvcutilを実行すると、私は次の持っている:
をsvcutil.exe http://localhost/Breeze.Workstation/Emergencies/EmergencyRegistrator.svc?wsdl
A WS-Metadata ExchangeまたはDISCOを使用して 'http://localhost/Breeze.Workstation/Emergencies/EmergencyRegistrator.svc?wsdl'からメタデータをダウンロードしないでください。 警告:次のポリシーアサーションはインポートされませんでした。 XPath:// wsdl:definitions [@ targetNamespace = 'http://tempuri.org/']/wsdl:binding [@ name = 'CustomBinding_IEmergencyRegistrator'] アサーション:。 。
ファイルの生成... C:\プログラムファイル(x86の)\のMicrosoft Visual Studioの10.0 \ VC \ EmergencyRegistrator.cs C:\プログラムファイル(x86の)\のMicrosoft Visual Studioの10.0 \ VC \ output.config
私はWCFサービスがとても新しくなっています。誰かが私を助けてくれることを願っています。おかげさまで
こんにちは。私はSLアプリケーションを使用します。私が以下に述べたように、唯一の誤りはあいまいなタイプでした。それはちょうど警告として示されていたことは奇妙です – Artiom