インストーラーの時に、各マシンに新しい証明書をインストールするので、証明書でエンコードされた値でアプリケーション構成ファイルを更新する必要があります。
<client>
<endpoint address="http://localhost:4064/DOXFA/MDMFileAccess.svc/epMainFA"
binding="wsFederationHttpBinding" bindingConfiguration="epMainFA"
contract="FileAccessService.IAMICASFileAccessService" name="epMainFA">
<identity>
<certificate encodedValue="**encoded value..."** />
</identity>
</endpoint>
....
<client>
アプリケーションの使用AbcServiceWCFサービスは、一部の操作を実行します。そのため、インストーラーはsvcutilを使用して構成ファイルを作成し、証明書でエンコードされた値を抽出して、アプリケーション構成ファイルに配置します。
ただし、svcutilは現在構成ファイルを生成していません。
svcutil.exe "http://localhost:4064/WebApp/Abc.svc?wsdl" /config:C:\wcf.config
Microsoft(R)サービスモデルメタデータツール[Microsoft(R)Windows(R)Communication Foundation、バージョン3.0.4506.648] Copyright(c)MicrosoftCorporation。全著作権所有。
WS-MetadataExchangeまたはDISCOを使用して「http:// localhost:4064 / WebApp / Abc.svc?wsdl」からメタデータをダウンロードしようとしています。
エラー:wsdl:bindingをインポートできません詳細:使用可能な代替ポリシーが見つかりません。エラーソースへのXPath:// wsdl:definitions [@ targetNamespace ='http://tempuri.org/'] / wsdl:binding [@ name ='epAbc']
エラー:wsdl:portをインポートできません詳細:wsdl:portが依存しているwsdl:bindingのインポート中にエラーが発生しました。wsdl:bindingへのXPath:// wsdl:definitions [@ targetNamespace ='http://tempuri.org/'] / wsdl:binding [@ name ='epAbc']エラーソースへのXPath:// wsdl:definitions [@ targetNamespace ='http://tempuri.org/']/wsdl:service[@name='AbcService']/wsdl:port@name='epAbc']
ファイルを生成しています...C:\ AbcService.cs
web.configは次のようになります(変更されたもの)
<system.serviceModel>
<bindings>
<wsFederationHttpBinding>
<binding name="bindMainFederation" closeTimeout="00:05:00" openTimeout="00:05:00"
sendTimeout="00:10:00" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security>
<message>
<issuerMetadata address="http://*ADDRESS*/appID/appID.svc/mex">
<identity>
<dns value="ADOCMergeSTS.com" />
</identity>
</issuerMetadata>
</message>
</security>
</binding>
</wsFederationHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="bhFederatedIdentity" name="X.AbcService">
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<endpoint address="epAbc" binding="wsFederationHttpBinding"
bindingConfiguration="bindMainFederation" name="epAbc" contract="X.IAbcService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="bhFederatedIdentity">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
<serviceDebug httpsHelpPageEnabled="false" includeExceptionDetailInFaults="true" />
<serviceTimeouts transactionTimeout="00:25:00" />
<serviceCredentials>
<serviceCertificate findValue="ADOCMergeService.com" storeLocation="LocalMachine"
storeName="My" x509FindType="FindBySubjectName" />
<issuedTokenAuthentication certificateValidationMode="PeerTrust">
<knownCertificates>
<add findValue="ADOCMergeSTS.com" storeLocation="LocalMachine"
storeName="TrustedPeople" x509FindType="FindBySubjectName" />
</knownCertificates>
</issuedTokenAuthentication>
</serviceCredentials>
<serviceAuthorization principalPermissionMode="None" serviceAuthorizationManagerType="X.AbcAuthorizationManager, x" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>