WCF 구성 설정에 대한 기본 지침이 필요합니다. 이것은 WCF (및 첫 번째 게시물 stackoverflow에 대한) 내 첫 번째 심각한 노력입니다.WCF에서 여러 서비스 끝점을 어떻게 구성합니까?
나는 내 웹 프로젝트 에서 참조하는 WCF 클래스 라이브러리 (APILibrary)를 가지고 있습니다. wcf 라이브러리에는 현재 IAuthService 및 ITradeService라는 두 개의 서비스가 있습니다.
1) 내 문제 (이 게시물에 대한 원래의 이유) 내 응용 프로그램을 컴파일 때 나는 TradeServiceCient 호출 할 수 오전입니다하지만 AuthServiceClient :
이 라인을 따라, 나는 세 가지 질문이 내 웹 앱에서. 후자는 인텔리 센스에 나타나지 않습니다. 나는 그들이 동일한 포트 (그리고 단 하나의 엔드 포인트 만 포함)를 공유하고 있다는 사실과 관련이 있다는 느낌이 들지만 분명히 분명하다. 불분명 함.
2) 개발 및 테스트하는 동안 동시에 두 개의 서비스 엔드 포인트를 노출하려고 시도하고 있습니다 (그리고 ). 스테이징으로 이동하고 호스팅 할 때 각 끝점에는 자체 주소가 있습니다. 그때까지, 어떻게합니까 나는 이것을합니까 (나는 이것이 나의 질문과 관련이 있다고 느낀다)?
3) 많은 사람들이 "클라이언트" 과 "server" "system.serviceModel"코드의 예제를 가지고 있다는 것을 눈치 채고 있습니다. 내 WCF 라이브러리에있는 App.config 파일의 이러한 고유 한 파일 또는 태그 이 있습니까? 각각 무엇을하고 있습니까? 현재 저는 서버 쪽만 가지고 있다고 생각합니까? 여기
이 (내 WCF 라이브러리) 나는 현재 내 app.config 파일에있는 것입니다 :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<client />
<services>
<service behaviorConfiguration="ApiLibrary.ApiBehavior" name="SpoonSys.Api.Trade.TradeService">
<endpoint address="" binding="wsHttpBinding" contract="SpoonSys.Api.Trade.ITradeService">
<identity>
<dns value="localhost:8731" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/ApiLibrary/Trade/" />
</baseAddresses>
</host>
</service>
<service behaviorConfiguration="ApiLibrary.ApiBehavior" name="SpoonSys.Api.Authentication.AuthService">
<endpoint address="" binding="wsHttpBinding" contract="SpoonSys.Api.Authentication.IAuthService">
<identity>
<dns value="localhost:8731" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/ApiLibrary/Authentication/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ApiLibrary.ApiBehavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above 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="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
내 구성이 ASP.NET/프레임 워크 3.5/VS 2008/C#
@marc_s says _ "다른 질문은 인텔리 센스에서 하나의 엔드 포인트 만 볼 수있는 이유입니다. 두 엔드 포인트 모두에 클라이언트 프록시를 작성 했습니까? 두 개의 별도 계약이므로 두 개의 개별 클라이언트 프록시가 필요합니다. 클라이언트 엔드 포인트를 작성 했습니까? 또한 클라이언트 구성 설정을 게시 할 수 있습니까? " – Kiquenet