基本的に、このチュートリアルhereに従いました
ローカルマシンからすべてを稼働させ、正常に動作させます。IIS に展開し、必要なファイアウォール ポートを許可したので、別のドメインにあるクライアント PC に移動します。
このマシンで WCF テスト クライアントを起動し、WSDL の URL を入力すると、問題なくサービス コールを表示できました。唯一のことは、実際にメソッドを使用して値を送信しようとすると、次の応答が返されることです
「発信者はサービスによって認証されませんでした」
奇妙なことに、ローカルではまだ動作しますが、別のマシンでは動作しません。何をしているかに基づいてクライアントを構成する特定の方法はありますか??
ここに私のweb.configがあります
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="WCF33.Service1">
<endpoint address ="" binding="wsHttpBinding" contract="WCF33.IService1" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/WCF33/Service1/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
私が従ったチュートリアルでは、メッセージヘッダーにキーを渡し、それに基づいて認証しますが、それは問題ではありません。wshttpバインディングと関係があると思いますが、このタイプの暗号化が必要です。
これを解決する方法について誰か情報/アドバイスをください:)