wsdl에서 생성 한 인터페이스로 작업하고 있으며 서비스를 Windows 서비스로 호스팅하려고 할 때 문제가 발생합니다.App.config 네임 스페이스 문제
다음 줄이 인터페이스 위에 나타납니다. 내가
[System.ServiceModel.ServiceContract]
에
[System.ServiceModel.ServiceContractAttribute(Namespace="http://xxxxxx.com/", ConfigurationName="IService")]
에서이를 변경하지 않는 한 나는 내 프로그램 (이벤트 뷰어에서 오류 로그를 호스팅하는 Windows 서비스를 시작할 수 없습니다 IService가에서 찾을 수 없습니다 계약은 말한다 서비스에 의해 구현 계약의 목록)은 다음과 같이 내가 엔드 포인트 내 app.config 파일을 나열하고 있습니다 :. I가 "http://xxxxxxx.com/IService"그것으로 계약을 변경하면이 또한 발생
endpoint address=""
binding="basicHttpBinding"
contract="Service.IService"
ServiceContractAttribute에 나타납니다. 이 문제를 어떻게 해결할 수 있을지에 대한 아이디어가 있습니까?
설정 파일의 서비스 부분 :
<service name="Service.Service"
behaviorConfiguration="myServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/Service"/>
</baseAddresses>
</host>
<endpoint address=""
binding="basicHttpBinding"
contract="Service.IService" />
<endpoint address="mex"
binding="mexHttpBinding"
contract="Service.IService" />
</service>
<behaviors>
<serviceBehaviors>
<behavior name="myServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="True"/>
</behavior>
</serviceBehaviors>
</behaviors>
이것은 끝점 구성 문제와 같지 않지만 서비스 구성과는 다릅니다. 속성에 ConfigurationName = "IService"가 포함되어 있습니다. app.config 요소를 name = "IService"로 게시 할 수 있습니까? –
itowlson