IIS.i.e에서 호스팅되는 wcf 안정적인 서비스를 http://192.168.100.87:7001/ProductRESTService.svc/에 사용할 수 없습니다.WCF 서비스를 수행하는 동안 기본 끝점 요소를 찾을 수 없습니다.
나는 클라이언트 응용 프로그램을 만들고 서비스 참조를 추가하고 서비스를위한 프록시를 만들고 prxoy를 사용하여 액세스했습니다.
오류 :
는 ServiceModel은 서비스 클라이언트 구성 섹션에서 계약 'ServiceReference2.IProductRESTService'를 참조하는 기본 끝점 요소를 찾을 수 없습니다. 이는 응용 프로그램에 대한 구성 파일이 없거나이 계약에 일치하는 엔드 포인트 요소가 클라이언트 요소에 없기 때. 일 수 있습니다.
내 web.config 파일은 다음과 같습니다.
<system.serviceModel>
<services>
<service name="MyRESTService.ProductRESTService" behaviorConfiguration="serviceBehavior">
<endpoint address=""
binding="webHttpBinding"
contract="MyRESTService.IProductRESTService"
behaviorConfiguration="web"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
안녕하세요, 내 클라이언트 구성 파일을 확인하십시오.
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ICreate_Restful_WCF_Service"/>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://192.168.1.xxx:2777/ProductRESTService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICreate_Restful_WCF_Service" contract="ServiceReference1.IProductRESTService" name="BasicHttpBinding_ICreate_Restful_WCF_Service"/>
</client>
</system.serviceModel>
</configuration>
게시 한 클라이언트 구성 파일은 서비스 용입니다. 이 문제는 서비스가 아닌 클라이언트와 관련이있는 것 같습니다. – Tim
안녕하세요, @Tim, 이제 클라이언트 구성 파일을 제공합니다. 한번 확인해보십시오. 오류가 있으면 알려주세요. –