현재 내 개발 컴퓨터에서 IIS Express에서 실행중인 webHttpBinding을 사용하여 새 IIS 호스트 WCF 서비스를 만들었으며 "서비스 참조 추가"를 시도하면 서비스가 올바르게 빌드됩니다. Reference.cs 파일은 괜찮아 보이지만 web.config 또는 app.config 파일은 업데이트되지 않습니다.VS2012 서비스 추가 참조 구성 파일을 업데이트하지 않음
경고 또는 오류 메시지가 수신되지 않습니다.
서비스와 클라이언트는 모두 .Net 4.5를 대상으로합니다.
서비스 설정
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="webInteropSecureBinding" allowCookies="false" maxBufferPoolSize="2097152" maxBufferSize="2097152" maxReceivedMessageSize="2097152">
<security mode="Transport" />
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="PsmDataProvider.PsmProvider" behaviorConfiguration="SecureRest">
<clear />
<endpoint address="" binding="webHttpBinding" bindingConfiguration="webInteropSecureBinding" name="PsmProvider" contract="PsmDataProvider.IPsmProvider" listenUriMode="Explicit" behaviorConfiguration="webHttpBehavior" />
<endpoint address="mex" binding="mexHttpsBinding" name="mex" contract="IMetadataExchange" listenUriMode="Explicit" />
<host>
<baseAddresses>
<add baseAddress="https://localhost:44300/PsmProvider/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="SecureRest">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="webHttpBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
클라이언트 구성
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
클라이언트 서비스 참조
일부 조사 후 내가 찾은이 StackOverflow의 질문에
그리고이 게시물위 심판의 각 "References types in References typeses"플래그를 해제하는 것과 같은 문제가 발생했습니다.
문제는 문제가 해결되지 않은 것입니다. 업데이트를 시도하고 서비스 참조를 삭제하고 다시 만들었지 만 설정 파일을 업데이트하지 않습니다. 이 서버 측 구성에 문제
질문
인가? 아니면 클라이언트 측의 문제입니까? 프록시 생성이 예상대로 작동하도록 변경하는 방법은 무엇입니까?
이것이 내 문제의 원인이었습니다. Visual Studio에서 서비스 참조를 생성 할 때 RESTful 서비스처럼 작동하도록 구성된 WCF 서비스에이 문제가 있습니다. – Sal