WCFを使用した3層クライアント/サーバーアプリケーションで非常に奇妙な問題があります。WindowsサービスでホストされているWCFにアクセスできない
まず、basicHttpBindingにWCFサービスをホストするサービスウィンドウがあります。これは、サーバーのapp.config:このサービスは、DMZ内のサーバーにデプロイされ
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<services>
<service name="Business.BSServiceManagement" behaviorConfiguration="myServiceBehave">
<host>
<baseAddresses>
<add baseAddress="http://localhost:35001"/>
</baseAddresses>
</host>
<endpoint address="/Clients" binding="basicHttpBinding" name="Clients" contract="Contracts.BusinessFacade.IBFClientManagement"/>
<endpoint address="/Users" binding="basicHttpBinding" name="Users" contract="Contracts.BusinessFacade.IBFUserManagement"/>
<endpoint address="/Licences" binding="basicHttpBinding" name="Licences" contract="Contracts.BusinessFacade.IBFLicenceManagement"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="myServiceBehave">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
と
第二に(私は、ポート番号とサービスのアドレスを入れている場合、Firefoxで)私は自分のコンピュータからのアクセスを持っています、私は、ChannelFactoryでサービスを利用するwinformsで作られたクライアントアプリケーションを持っています。
これは、クライアントのapp.configです:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<client>
<endpoint address="http://192.168.128.1:35001/Clients" binding="basicHttpBinding" name="Clients" contract="Contracts.BusinessFacade.IBFClientManagement"/>
<endpoint address="http://192.168.128.1:35001/Users" binding="basicHttpBinding" name="Users" contract="Contracts.BusinessFacade.IBFUserManagement"/>
<endpoint address="http://192.168.128.1:35001/Licences" binding="basicHttpBinding" name="Licences" contract="Contracts.BusinessFacade.IBFLicenceManagement"/>
</client>
</system.serviceModel>
</configuration>
私は、クライアント・アプリケーションをデバッグするとき、すべてが完璧に動作します。だから私は、複数のコンピュータ上でアプリケーションをデプロイするためにインストーラプロジェクトを作ったが、私はアプリケーション(インストール、または直接ビン/発売中)のexeファイルを実行すると、私はこのようなエラーメッセージがあります。
There was no endpoint listening at http://192.168.128.1:35001/Users...
を内部例外は述べています:私は、サーバーとクライアントコンピュータのファイアウォールを確認し、ポート番号を変更し、MEXエンドポイントの追加しようとした
リモートサーバに
を接続することができません問題がある場合、私は理解していません。
ありがとうございました。
EDIT 1:私は、リリースexeファイルではなくデバッグexeファイルで同じ問題を抱えているいくつかのテストの後
。
私はデバッグexeを実行すると、すべて正常に動作しますが、リリースexeはエラーメッセージを返します。
デバッグの設定を理解しようとしています。あなたのbaseAddressノードは 'localhost'ですが、開発マシン上でローカルに実行されているサービスですか? – leetibbett
いいえ、私はDMZ内の別のコンピュータにサービスをインストールしました。私はマシン上のデバッグ時にクライアントのみを実行し、完全に動作します。しかし、マシンにクライアントをインストールしても動作しません。 – user1069516
VSは通常管理者として実行されていますが、管理者としてクライアントを実行するとどうなりますか?クライアントexeのファイアウォール設定を追加しましたか? – leetibbett