간단한 WCF 서비스를위한 콘솔 기반 호스트가 가장 단순합니다. 서비스에 대한 응용 프로그램의 설정은 다음과 같습니다 ** 콘솔 기반 WCF 호스트 *가장 간단한 콘솔 호스팅 WCF 서비스는 탐색 할 때 404를 생성합니다.
***** Host Info ******
Address: http://localhost:8080/MagicEightBallService
Binding: BasicHttpBinding
Contract: IEightBall
Address: http://localhost:8080/MagicEightBallService/mex
Binding: MetadataExchangeHttpBinding
Contract: IMetadataExchange
**************************************************
The service is ready
을 내가 찾아 보거나 생성하려고하면 :
<system.serviceModel>
<services>
<service name="MagicEightBallServiceLib.MagicEightBallService"
behaviorConfiguration="EightBallServiceMEXBehavior">
<endpoint address=""
binding = "basicHttpBinding"
contract = "MagicEightBallServiceLib.IEightBall" />
<!-- Enable the MEX endpoint-->
<endpoint address="mex"
binding ="mexHttpBinding"
contract ="IMetadataExchange" />
<!--Need to add this so MEX knows the address of our service -->
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/MagicEightBallService"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="EightBallServiceMEXBehavior">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
호스트 프로그램은 완벽하게 실행 보여줍니다 프록시 얻을 : HTTP 오류 404.0 - 찾을 수 없습니다.
무엇이 잘못되었는지 알 수 없습니다. 이보다 더 간단한 것을 얻을 수 없습니다!