WCF service
을 사용하려고 할 때 아래 오류가 발생합니다. I looked into this issue and both name and contract values are same in both config files
. WCF 서비스를 사용할 때 끝점 요소를 찾을 수 없습니다.
는 ServiceModel은 서비스 클라이언트 구성 섹션에서 'BasicHttpBinding_IService1' 계약 'ServiceReference1.IService1'이름을 가진 엔드 포인트 요소를 찾을 수 없습니다. 이는 응용 프로그램에 대해 구성 파일이 없거나 클라이언트 요소에 과 일치하는 끝점 요소가 없기 때문일 수 있습니다.
WCF 서비스가 내 솔루션에 자유 주의적이며 같은 솔루션으로 다른 클래스의 자유 프로젝트에서 사용하려고합니다.
Client.config
<endpoint address="http://localhost:8733/Design_Time_Addresses/WcfServiceLibrary1/Service1/"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" />
</client>
WCF 설정 파일
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<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>
<services>
<service name="WcfServiceLibrary1.Service1">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8733/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="basicHttpBinding" contract="WcfServiceLibrary1.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="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>
</system.serviceModel>
</configuration>
서비스가 브라우저에서 사용 가능하다는 것을 아십니까? – silver
브라우저에서 사용 가능합니다. – simbada