WCFサービスライブラリからクライアントプロキシを生成しようとしています。私はWindows XP ProワークステーションでVS2005、.NET 3.0を使用しています。 WCFサービスは、Windowsサービスでホストされます。 Windowsサービスをコンソールアプリケーションとして実行すると問題はありません。そのアドレスに対してsvcutil.exeを実行すると、プロキシが生成されます。しかし、そのサービスをリリースモードでコンパイルし、InstallUtilを使用してワークステーションにインストールすると、「エラー:メタデータをnet.tcp:// localhost:9090/Service2から取得できません」というエラーが表示されます。これらは私がサービスWindowsサービスからクライアントプロキシを生成する
<behaviors>
<endpointBehaviors>
<behavior name="Test2">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="serviceBehaviour">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata />
<!--<serviceMetadata httpGetEnabled="true" />-->
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="TestBinding2" inactivityTimeout = "00:30:00" openTimeout="00:30:00"
receiveTimeout="00:30:00"
sendTimeout="00:30:00">
<binaryMessageEncoding />
<tcpTransport transferMode="StreamedResponse" />
</binding>
</customBinding>
</bindings>
設定の "system.serviceModel"セクション全体と、Windowsサービスの起動に使用しているコードを投稿できますか? –
<エンドポイントバインディング= "mexTcpBinding" 名前= "TCP_Mex" 契約= "IMetadataExchange" /> = "customBinding" bindingConfiguration = "TestBinding2" 名前= "TestBinding2を" 結合 <エンドポイントアドレス= "MEX" contract = "WCFServiceLibrary3.IService2" behaviorConfiguration = "Test2" /> – klone